2 * Copyright (c) 2011-2016 Synaptics Incorporated
3 * Copyright (c) 2011 Unixphere
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
10 #ifndef _RMI_2D_SENSOR_H
11 #define _RMI_2D_SENSOR_H
13 enum rmi_2d_sensor_object_type
{
18 RMI_2D_OBJECT_UNCLASSIFIED
,
21 struct rmi_2d_sensor_abs_object
{
22 enum rmi_2d_sensor_object_type type
;
32 * @axis_align - controls parameters that are useful in system prototyping
34 * @max_x - The maximum X coordinate that will be reported by this sensor.
35 * @max_y - The maximum Y coordinate that will be reported by this sensor.
36 * @nbr_fingers - How many fingers can this sensor report?
37 * @data_pkt - buffer for data reported by this sensor.
38 * @pkt_size - number of bytes in that buffer.
39 * @attn_size - Size of the HID attention report (only contains abs data).
40 * position when two fingers are on the device. When this is true, we
41 * assume we have one of those sensors and report events appropriately.
42 * @sensor_type - indicates whether we're touchscreen or touchpad.
43 * @input - input device for absolute pointing stream
44 * @input_phys - buffer for the absolute phys name for this sensor.
46 struct rmi_2d_sensor
{
47 struct rmi_2d_axis_alignment axis_align
;
48 struct input_mt_pos
*tracking_pos
;
51 struct rmi_2d_sensor_abs_object
*objs
;
62 enum rmi_sensor_type sensor_type
;
63 struct input_dev
*input
;
64 struct rmi_function
*fn
;
72 int rmi_2d_sensor_of_probe(struct device
*dev
,
73 struct rmi_2d_sensor_platform_data
*pdata
);
75 void rmi_2d_sensor_abs_process(struct rmi_2d_sensor
*sensor
,
76 struct rmi_2d_sensor_abs_object
*obj
,
79 void rmi_2d_sensor_abs_report(struct rmi_2d_sensor
*sensor
,
80 struct rmi_2d_sensor_abs_object
*obj
,
83 void rmi_2d_sensor_rel_report(struct rmi_2d_sensor
*sensor
, int x
, int y
);
85 int rmi_2d_sensor_configure_input(struct rmi_function
*fn
,
86 struct rmi_2d_sensor
*sensor
);
87 #endif /* _RMI_2D_SENSOR_H */