xtensa: fix high memory/reserved memory collision
[cris-mirror.git] / include / linux / platform_data / pixcir_i2c_ts.h
blob4ab3cd6f1cc20a94cce50449589819f554c0e1d0
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _PIXCIR_I2C_TS_H
3 #define _PIXCIR_I2C_TS_H
5 /*
6 * Register map
7 */
8 #define PIXCIR_REG_POWER_MODE 51
9 #define PIXCIR_REG_INT_MODE 52
12 * Power modes:
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 {
20 PIXCIR_POWER_ACTIVE,
21 PIXCIR_POWER_IDLE,
22 PIXCIR_POWER_HALT,
25 #define PIXCIR_POWER_MODE_MASK 0x03
26 #define PIXCIR_POWER_ALLOW_IDLE (1UL << 2)
29 * Interrupt modes:
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)
47 /**
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 {
54 u8 max_fingers;
55 bool has_hw_ids;
58 struct pixcir_ts_platform_data {
59 int x_max;
60 int y_max;
61 struct pixcir_i2c_chip_data chip;
64 #endif