blob: 09d22ccb9e415e4797077ef60df5886cff8b9a53 [file] [log] [blame]
Sebastian Reichelb98abe52014-05-28 23:51:53 -07001/*
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 Torokhov4200e832015-07-06 15:18:24 -070012struct input_dev;
Hans de Goedeed7c9872016-07-15 14:05:29 -070013struct input_mt_pos;
Sebastian Reichelb98abe52014-05-28 23:51:53 -070014
Hans de Goedeed7c9872016-07-15 14:05:29 -070015struct 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
23void touchscreen_parse_properties(struct input_dev *input, bool multitouch,
24 struct touchscreen_properties *prop);
25
26void touchscreen_set_mt_pos(struct input_mt_pos *pos,
27 const struct touchscreen_properties *prop,
28 unsigned int x, unsigned int y);
29
30void touchscreen_report_pos(struct input_dev *input,
31 const struct touchscreen_properties *prop,
32 unsigned int x, unsigned int y,
33 bool multitouch);
Sebastian Reichelb98abe52014-05-28 23:51:53 -070034
35#endif