1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _PIXCIR_I2C_TS_H
3 #define _PIXCIR_I2C_TS_H
8 #define PIXCIR_REG_POWER_MODE 51
9 #define PIXCIR_REG_INT_MODE 52
13 * active: max scan speed
14 * idle: lower scan speed with automatic transition to active on touch
15 * halt: datasheet says sleep but this is more like halt as the chip
16 * clocks are cut and it can only be brought out of this mode
17 * using the RESET pin.
19 enum pixcir_power_mode
{
25 #define PIXCIR_POWER_MODE_MASK 0x03
26 #define PIXCIR_POWER_ALLOW_IDLE (1UL << 2)
30 * periodical: interrupt is asserted periodicaly
31 * diff coordinates: interrupt is asserted when coordinates change
32 * level on touch: interrupt level asserted during touch
33 * pulse on touch: interrupt pulse asserted druing touch
36 enum pixcir_int_mode
{
37 PIXCIR_INT_PERIODICAL
,
38 PIXCIR_INT_DIFF_COORD
,
39 PIXCIR_INT_LEVEL_TOUCH
,
40 PIXCIR_INT_PULSE_TOUCH
,
43 #define PIXCIR_INT_MODE_MASK 0x03
44 #define PIXCIR_INT_ENABLE (1UL << 3)
45 #define PIXCIR_INT_POL_HIGH (1UL << 2)
48 * struct pixcir_irc_chip_data - chip related data
49 * @max_fingers: Max number of fingers reported simultaneously by h/w
50 * @has_hw_ids: Hardware supports finger tracking IDs
53 struct pixcir_i2c_chip_data
{
58 struct pixcir_ts_platform_data
{
61 struct pixcir_i2c_chip_data chip
;