Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (c) 2014 Sebastian Reichel <sre@kernel.org>
0004  */
0005 
0006 #ifndef _TOUCHSCREEN_H
0007 #define _TOUCHSCREEN_H
0008 
0009 struct input_dev;
0010 struct input_mt_pos;
0011 
0012 struct touchscreen_properties {
0013     unsigned int max_x;
0014     unsigned int max_y;
0015     bool invert_x;
0016     bool invert_y;
0017     bool swap_x_y;
0018 };
0019 
0020 void touchscreen_parse_properties(struct input_dev *input, bool multitouch,
0021                   struct touchscreen_properties *prop);
0022 
0023 void touchscreen_set_mt_pos(struct input_mt_pos *pos,
0024                 const struct touchscreen_properties *prop,
0025                 unsigned int x, unsigned int y);
0026 
0027 void touchscreen_report_pos(struct input_dev *input,
0028                 const struct touchscreen_properties *prop,
0029                 unsigned int x, unsigned int y,
0030                 bool multitouch);
0031 
0032 #endif