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
12struct input_dev;
13struct input_mt_pos;
14
15struct 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);
34
35#endif
36