Sebastian Reichel | b98abe5 | 2014-05-28 23:51:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 Sebastian Reichel <sre@kernel.org> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it |
| 5 | * under the terms of the GNU General Public License version 2 as published by |
| 6 | * the Free Software Foundation. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _TOUCHSCREEN_H |
| 10 | #define _TOUCHSCREEN_H |
| 11 | |
Dmitry Torokhov | 4200e83 | 2015-07-06 15:18:24 -0700 | [diff] [blame] | 12 | struct input_dev; |
Hans de Goede | ed7c987 | 2016-07-15 14:05:29 -0700 | [diff] [blame] | 13 | struct input_mt_pos; |
Sebastian Reichel | b98abe5 | 2014-05-28 23:51:53 -0700 | [diff] [blame] | 14 | |
Hans de Goede | ed7c987 | 2016-07-15 14:05:29 -0700 | [diff] [blame] | 15 | struct touchscreen_properties { |
| 16 | unsigned int max_x; |
| 17 | unsigned int max_y; |
| 18 | bool invert_x; |
| 19 | bool invert_y; |
| 20 | bool swap_x_y; |
| 21 | }; |
| 22 | |
| 23 | void touchscreen_parse_properties(struct input_dev *input, bool multitouch, |
| 24 | struct touchscreen_properties *prop); |
| 25 | |
| 26 | void touchscreen_set_mt_pos(struct input_mt_pos *pos, |
| 27 | const struct touchscreen_properties *prop, |
| 28 | unsigned int x, unsigned int y); |
| 29 | |
| 30 | void touchscreen_report_pos(struct input_dev *input, |
| 31 | const struct touchscreen_properties *prop, |
| 32 | unsigned int x, unsigned int y, |
| 33 | bool multitouch); |
Sebastian Reichel | b98abe5 | 2014-05-28 23:51:53 -0700 | [diff] [blame] | 34 | |
| 35 | #endif |