mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 22:21:59 +07:00
ed7c9870c9
Extend touchscreen_parse_properties() with support for the touchscreen-inverted-x/y and touchscreen-swapped-x-y properties and add touchscreen_set_mt_pos() and touchscreen_report_pos() helper functions for storing coordinates into a input_mt_pos struct, or directly reporting them, taking these properties into account. This commit also modifies the existing callers of touchscreen_parse_properties() to pass in NULL for the new third argument, keeping the existing behavior. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
36 lines
909 B
C
36 lines
909 B
C
/*
|
|
* Copyright (c) 2014 Sebastian Reichel <sre@kernel.org>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 as published by
|
|
* the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _TOUCHSCREEN_H
|
|
#define _TOUCHSCREEN_H
|
|
|
|
struct input_dev;
|
|
struct input_mt_pos;
|
|
|
|
struct touchscreen_properties {
|
|
unsigned int max_x;
|
|
unsigned int max_y;
|
|
bool invert_x;
|
|
bool invert_y;
|
|
bool swap_x_y;
|
|
};
|
|
|
|
void touchscreen_parse_properties(struct input_dev *input, bool multitouch,
|
|
struct touchscreen_properties *prop);
|
|
|
|
void touchscreen_set_mt_pos(struct input_mt_pos *pos,
|
|
const struct touchscreen_properties *prop,
|
|
unsigned int x, unsigned int y);
|
|
|
|
void touchscreen_report_pos(struct input_dev *input,
|
|
const struct touchscreen_properties *prop,
|
|
unsigned int x, unsigned int y,
|
|
bool multitouch);
|
|
|
|
#endif
|