1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2011-2016 Synaptics Incorporated
4 * Copyright (c) 2011 Unixphere
7 #ifndef _RMI_2D_SENSOR_H
8 #define _RMI_2D_SENSOR_H
10 enum rmi_2d_sensor_object_type
{
15 RMI_2D_OBJECT_UNCLASSIFIED
,
18 struct rmi_2d_sensor_abs_object
{
19 enum rmi_2d_sensor_object_type type
;
29 * @axis_align - controls parameters that are useful in system prototyping
31 * @max_x - The maximum X coordinate that will be reported by this sensor.
32 * @max_y - The maximum Y coordinate that will be reported by this sensor.
33 * @nbr_fingers - How many fingers can this sensor report?
34 * @data_pkt - buffer for data reported by this sensor.
35 * @pkt_size - number of bytes in that buffer.
36 * @attn_size - Size of the HID attention report (only contains abs data).
37 * position when two fingers are on the device. When this is true, we
38 * assume we have one of those sensors and report events appropriately.
39 * @sensor_type - indicates whether we're touchscreen or touchpad.
40 * @input - input device for absolute pointing stream
41 * @input_phys - buffer for the absolute phys name for this sensor.
43 struct rmi_2d_sensor
{
44 struct rmi_2d_axis_alignment axis_align
;
45 struct input_mt_pos
*tracking_pos
;
48 struct rmi_2d_sensor_abs_object
*objs
;
59 enum rmi_sensor_type sensor_type
;
60 struct input_dev
*input
;
61 struct rmi_function
*fn
;
67 enum rmi_reg_state dribble
;
68 enum rmi_reg_state palm_detect
;
71 int rmi_2d_sensor_of_probe(struct device
*dev
,
72 struct rmi_2d_sensor_platform_data
*pdata
);
74 void rmi_2d_sensor_abs_process(struct rmi_2d_sensor
*sensor
,
75 struct rmi_2d_sensor_abs_object
*obj
,
78 void rmi_2d_sensor_abs_report(struct rmi_2d_sensor
*sensor
,
79 struct rmi_2d_sensor_abs_object
*obj
,
82 void rmi_2d_sensor_rel_report(struct rmi_2d_sensor
*sensor
, int x
, int y
);
84 int rmi_2d_sensor_configure_input(struct rmi_function
*fn
,
85 struct rmi_2d_sensor
*sensor
);
86 #endif /* _RMI_2D_SENSOR_H */