1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2b98abe52SSebastian Reichel /* 3b98abe52SSebastian Reichel * Copyright (c) 2014 Sebastian Reichel <[email protected]> 4b98abe52SSebastian Reichel */ 5b98abe52SSebastian Reichel 6b98abe52SSebastian Reichel #ifndef _TOUCHSCREEN_H 7b98abe52SSebastian Reichel #define _TOUCHSCREEN_H 8b98abe52SSebastian Reichel 94200e831SDmitry Torokhov struct input_dev; 10ed7c9870SHans de Goede struct input_mt_pos; 11b98abe52SSebastian Reichel 12ed7c9870SHans de Goede struct touchscreen_properties { 13ed7c9870SHans de Goede unsigned int max_x; 14ed7c9870SHans de Goede unsigned int max_y; 15ed7c9870SHans de Goede bool invert_x; 16ed7c9870SHans de Goede bool invert_y; 17ed7c9870SHans de Goede bool swap_x_y; 18ed7c9870SHans de Goede }; 19ed7c9870SHans de Goede 20ed7c9870SHans de Goede void touchscreen_parse_properties(struct input_dev *input, bool multitouch, 21ed7c9870SHans de Goede struct touchscreen_properties *prop); 22ed7c9870SHans de Goede 23ed7c9870SHans de Goede void touchscreen_set_mt_pos(struct input_mt_pos *pos, 24ed7c9870SHans de Goede const struct touchscreen_properties *prop, 25ed7c9870SHans de Goede unsigned int x, unsigned int y); 26ed7c9870SHans de Goede 27ed7c9870SHans de Goede void touchscreen_report_pos(struct input_dev *input, 28ed7c9870SHans de Goede const struct touchscreen_properties *prop, 29ed7c9870SHans de Goede unsigned int x, unsigned int y, 30ed7c9870SHans de Goede bool multitouch); 31b98abe52SSebastian Reichel 32b98abe52SSebastian Reichel #endif 33