diff options
Diffstat (limited to 'include/linux/input')
| -rw-r--r-- | include/linux/input/adp5589.h | 157 | ||||
| -rw-r--r-- | include/linux/input/adxl34x.h | 21 | ||||
| -rw-r--r-- | include/linux/input/auo-pixcir-ts.h | 56 | ||||
| -rw-r--r-- | include/linux/input/bu21013.h | 10 | ||||
| -rw-r--r-- | include/linux/input/cyttsp.h | 58 | ||||
| -rw-r--r-- | include/linux/input/edt-ft5x06.h | 24 | ||||
| -rw-r--r-- | include/linux/input/eeti_ts.h | 1 | ||||
| -rw-r--r-- | include/linux/input/gp2ap002a00f.h | 22 | ||||
| -rw-r--r-- | include/linux/input/gpio_tilt.h | 73 | ||||
| -rw-r--r-- | include/linux/input/ili210x.h | 10 | ||||
| -rw-r--r-- | include/linux/input/kxtj9.h | 11 | ||||
| -rw-r--r-- | include/linux/input/lm8333.h | 24 | ||||
| -rw-r--r-- | include/linux/input/matrix_keypad.h | 37 | ||||
| -rw-r--r-- | include/linux/input/mt.h | 71 | ||||
| -rw-r--r-- | include/linux/input/navpoint.h | 12 | ||||
| -rw-r--r-- | include/linux/input/pixcir_ts.h | 10 | ||||
| -rw-r--r-- | include/linux/input/samsung-keypad.h | 43 | ||||
| -rw-r--r-- | include/linux/input/tca8418_keypad.h | 44 | ||||
| -rw-r--r-- | include/linux/input/tegra_kbc.h | 62 | ||||
| -rw-r--r-- | include/linux/input/ti_am335x_tsc.h | 23 |
20 files changed, 152 insertions, 617 deletions
diff --git a/include/linux/input/adp5589.h b/include/linux/input/adp5589.h index 1a05eee15e6..ef792ecfaab 100644 --- a/include/linux/input/adp5589.h +++ b/include/linux/input/adp5589.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Analog Devices ADP5589/ADP5585 I/O Expander and QWERTY Keypad Controller | 2 | * Analog Devices ADP5589 I/O Expander and QWERTY Keypad Controller |
| 3 | * | 3 | * |
| 4 | * Copyright 2010-2011 Analog Devices Inc. | 4 | * Copyright 2010-2011 Analog Devices Inc. |
| 5 | * | 5 | * |
| @@ -9,9 +9,89 @@ | |||
| 9 | #ifndef _ADP5589_H | 9 | #ifndef _ADP5589_H |
| 10 | #define _ADP5589_H | 10 | #define _ADP5589_H |
| 11 | 11 | ||
| 12 | /* | 12 | #define ADP5589_ID 0x00 |
| 13 | * ADP5589 specific GPI and Keymap defines | 13 | #define ADP5589_INT_STATUS 0x01 |
| 14 | */ | 14 | #define ADP5589_STATUS 0x02 |
| 15 | #define ADP5589_FIFO_1 0x03 | ||
| 16 | #define ADP5589_FIFO_2 0x04 | ||
| 17 | #define ADP5589_FIFO_3 0x05 | ||
| 18 | #define ADP5589_FIFO_4 0x06 | ||
| 19 | #define ADP5589_FIFO_5 0x07 | ||
| 20 | #define ADP5589_FIFO_6 0x08 | ||
| 21 | #define ADP5589_FIFO_7 0x09 | ||
| 22 | #define ADP5589_FIFO_8 0x0A | ||
| 23 | #define ADP5589_FIFO_9 0x0B | ||
| 24 | #define ADP5589_FIFO_10 0x0C | ||
| 25 | #define ADP5589_FIFO_11 0x0D | ||
| 26 | #define ADP5589_FIFO_12 0x0E | ||
| 27 | #define ADP5589_FIFO_13 0x0F | ||
| 28 | #define ADP5589_FIFO_14 0x10 | ||
| 29 | #define ADP5589_FIFO_15 0x11 | ||
| 30 | #define ADP5589_FIFO_16 0x12 | ||
| 31 | #define ADP5589_GPI_INT_STAT_A 0x13 | ||
| 32 | #define ADP5589_GPI_INT_STAT_B 0x14 | ||
| 33 | #define ADP5589_GPI_INT_STAT_C 0x15 | ||
| 34 | #define ADP5589_GPI_STATUS_A 0x16 | ||
| 35 | #define ADP5589_GPI_STATUS_B 0x17 | ||
| 36 | #define ADP5589_GPI_STATUS_C 0x18 | ||
| 37 | #define ADP5589_RPULL_CONFIG_A 0x19 | ||
| 38 | #define ADP5589_RPULL_CONFIG_B 0x1A | ||
| 39 | #define ADP5589_RPULL_CONFIG_C 0x1B | ||
| 40 | #define ADP5589_RPULL_CONFIG_D 0x1C | ||
| 41 | #define ADP5589_RPULL_CONFIG_E 0x1D | ||
| 42 | #define ADP5589_GPI_INT_LEVEL_A 0x1E | ||
| 43 | #define ADP5589_GPI_INT_LEVEL_B 0x1F | ||
| 44 | #define ADP5589_GPI_INT_LEVEL_C 0x20 | ||
| 45 | #define ADP5589_GPI_EVENT_EN_A 0x21 | ||
| 46 | #define ADP5589_GPI_EVENT_EN_B 0x22 | ||
| 47 | #define ADP5589_GPI_EVENT_EN_C 0x23 | ||
| 48 | #define ADP5589_GPI_INTERRUPT_EN_A 0x24 | ||
| 49 | #define ADP5589_GPI_INTERRUPT_EN_B 0x25 | ||
| 50 | #define ADP5589_GPI_INTERRUPT_EN_C 0x26 | ||
| 51 | #define ADP5589_DEBOUNCE_DIS_A 0x27 | ||
| 52 | #define ADP5589_DEBOUNCE_DIS_B 0x28 | ||
| 53 | #define ADP5589_DEBOUNCE_DIS_C 0x29 | ||
| 54 | #define ADP5589_GPO_DATA_OUT_A 0x2A | ||
| 55 | #define ADP5589_GPO_DATA_OUT_B 0x2B | ||
| 56 | #define ADP5589_GPO_DATA_OUT_C 0x2C | ||
| 57 | #define ADP5589_GPO_OUT_MODE_A 0x2D | ||
| 58 | #define ADP5589_GPO_OUT_MODE_B 0x2E | ||
| 59 | #define ADP5589_GPO_OUT_MODE_C 0x2F | ||
| 60 | #define ADP5589_GPIO_DIRECTION_A 0x30 | ||
| 61 | #define ADP5589_GPIO_DIRECTION_B 0x31 | ||
| 62 | #define ADP5589_GPIO_DIRECTION_C 0x32 | ||
| 63 | #define ADP5589_UNLOCK1 0x33 | ||
| 64 | #define ADP5589_UNLOCK2 0x34 | ||
| 65 | #define ADP5589_EXT_LOCK_EVENT 0x35 | ||
| 66 | #define ADP5589_UNLOCK_TIMERS 0x36 | ||
| 67 | #define ADP5589_LOCK_CFG 0x37 | ||
| 68 | #define ADP5589_RESET1_EVENT_A 0x38 | ||
| 69 | #define ADP5589_RESET1_EVENT_B 0x39 | ||
| 70 | #define ADP5589_RESET1_EVENT_C 0x3A | ||
| 71 | #define ADP5589_RESET2_EVENT_A 0x3B | ||
| 72 | #define ADP5589_RESET2_EVENT_B 0x3C | ||
| 73 | #define ADP5589_RESET_CFG 0x3D | ||
| 74 | #define ADP5589_PWM_OFFT_LOW 0x3E | ||
| 75 | #define ADP5589_PWM_OFFT_HIGH 0x3F | ||
| 76 | #define ADP5589_PWM_ONT_LOW 0x40 | ||
| 77 | #define ADP5589_PWM_ONT_HIGH 0x41 | ||
| 78 | #define ADP5589_PWM_CFG 0x42 | ||
| 79 | #define ADP5589_CLOCK_DIV_CFG 0x43 | ||
| 80 | #define ADP5589_LOGIC_1_CFG 0x44 | ||
| 81 | #define ADP5589_LOGIC_2_CFG 0x45 | ||
| 82 | #define ADP5589_LOGIC_FF_CFG 0x46 | ||
| 83 | #define ADP5589_LOGIC_INT_EVENT_EN 0x47 | ||
| 84 | #define ADP5589_POLL_PTIME_CFG 0x48 | ||
| 85 | #define ADP5589_PIN_CONFIG_A 0x49 | ||
| 86 | #define ADP5589_PIN_CONFIG_B 0x4A | ||
| 87 | #define ADP5589_PIN_CONFIG_C 0x4B | ||
| 88 | #define ADP5589_PIN_CONFIG_D 0x4C | ||
| 89 | #define ADP5589_GENERAL_CFG 0x4D | ||
| 90 | #define ADP5589_INT_EN 0x4E | ||
| 91 | |||
| 92 | #define ADP5589_DEVICE_ID_MASK 0xF | ||
| 93 | |||
| 94 | /* Put one of these structures in i2c_board_info platform_data */ | ||
| 15 | 95 | ||
| 16 | #define ADP5589_KEYMAPSIZE 88 | 96 | #define ADP5589_KEYMAPSIZE 88 |
| 17 | 97 | ||
| @@ -47,35 +127,6 @@ | |||
| 47 | 127 | ||
| 48 | #define ADP5589_GPIMAPSIZE_MAX (ADP5589_GPI_PIN_END - ADP5589_GPI_PIN_BASE + 1) | 128 | #define ADP5589_GPIMAPSIZE_MAX (ADP5589_GPI_PIN_END - ADP5589_GPI_PIN_BASE + 1) |
| 49 | 129 | ||
| 50 | /* | ||
| 51 | * ADP5585 specific GPI and Keymap defines | ||
| 52 | */ | ||
| 53 | |||
| 54 | #define ADP5585_KEYMAPSIZE 30 | ||
| 55 | |||
| 56 | #define ADP5585_GPI_PIN_ROW0 37 | ||
| 57 | #define ADP5585_GPI_PIN_ROW1 38 | ||
| 58 | #define ADP5585_GPI_PIN_ROW2 39 | ||
| 59 | #define ADP5585_GPI_PIN_ROW3 40 | ||
| 60 | #define ADP5585_GPI_PIN_ROW4 41 | ||
| 61 | #define ADP5585_GPI_PIN_ROW5 42 | ||
| 62 | #define ADP5585_GPI_PIN_COL0 43 | ||
| 63 | #define ADP5585_GPI_PIN_COL1 44 | ||
| 64 | #define ADP5585_GPI_PIN_COL2 45 | ||
| 65 | #define ADP5585_GPI_PIN_COL3 46 | ||
| 66 | #define ADP5585_GPI_PIN_COL4 47 | ||
| 67 | #define GPI_LOGIC 48 | ||
| 68 | |||
| 69 | #define ADP5585_GPI_PIN_ROW_BASE ADP5585_GPI_PIN_ROW0 | ||
| 70 | #define ADP5585_GPI_PIN_ROW_END ADP5585_GPI_PIN_ROW5 | ||
| 71 | #define ADP5585_GPI_PIN_COL_BASE ADP5585_GPI_PIN_COL0 | ||
| 72 | #define ADP5585_GPI_PIN_COL_END ADP5585_GPI_PIN_COL4 | ||
| 73 | |||
| 74 | #define ADP5585_GPI_PIN_BASE ADP5585_GPI_PIN_ROW_BASE | ||
| 75 | #define ADP5585_GPI_PIN_END ADP5585_GPI_PIN_COL_END | ||
| 76 | |||
| 77 | #define ADP5585_GPIMAPSIZE_MAX (ADP5585_GPI_PIN_END - ADP5585_GPI_PIN_BASE + 1) | ||
| 78 | |||
| 79 | struct adp5589_gpi_map { | 130 | struct adp5589_gpi_map { |
| 80 | unsigned short pin; | 131 | unsigned short pin; |
| 81 | unsigned short sw_evt; | 132 | unsigned short sw_evt; |
| @@ -108,7 +159,7 @@ struct adp5589_gpi_map { | |||
| 108 | #define RESET2_POL_HIGH (1 << 7) | 159 | #define RESET2_POL_HIGH (1 << 7) |
| 109 | #define RESET2_POL_LOW (0 << 7) | 160 | #define RESET2_POL_LOW (0 << 7) |
| 110 | 161 | ||
| 111 | /* ADP5589 Mask Bits: | 162 | /* Mask Bits: |
| 112 | * C C C C C C C C C C C | R R R R R R R R | 163 | * C C C C C C C C C C C | R R R R R R R R |
| 113 | * 1 9 8 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 | 164 | * 1 9 8 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 |
| 114 | * 0 | 165 | * 0 |
| @@ -117,44 +168,18 @@ struct adp5589_gpi_map { | |||
| 117 | * 8 7 6 5 4 3 2 1 0 9 8 | 7 6 5 4 3 2 1 0 | 168 | * 8 7 6 5 4 3 2 1 0 9 8 | 7 6 5 4 3 2 1 0 |
| 118 | */ | 169 | */ |
| 119 | 170 | ||
| 120 | #define ADP_ROW(x) (1 << (x)) | 171 | #define ADP_ROW(x) (1 << (x)) |
| 121 | #define ADP_COL(x) (1 << (x + 8)) | 172 | #define ADP_COL(x) (1 << (x + 8)) |
| 122 | #define ADP5589_ROW_MASK 0xFF | ||
| 123 | #define ADP5589_COL_MASK 0xFF | ||
| 124 | #define ADP5589_COL_SHIFT 8 | ||
| 125 | #define ADP5589_MAX_ROW_NUM 7 | ||
| 126 | #define ADP5589_MAX_COL_NUM 10 | ||
| 127 | |||
| 128 | /* ADP5585 Mask Bits: | ||
| 129 | * C C C C C | R R R R R R | ||
| 130 | * 4 3 2 1 0 | 5 4 3 2 1 0 | ||
| 131 | * | ||
| 132 | * ---- BIT -- ----------- | ||
| 133 | * 1 0 0 0 0 | 0 0 0 0 0 0 | ||
| 134 | * 0 9 8 7 6 | 5 4 3 2 1 0 | ||
| 135 | */ | ||
| 136 | |||
| 137 | #define ADP5585_ROW_MASK 0x3F | ||
| 138 | #define ADP5585_COL_MASK 0x1F | ||
| 139 | #define ADP5585_ROW_SHIFT 0 | ||
| 140 | #define ADP5585_COL_SHIFT 6 | ||
| 141 | #define ADP5585_MAX_ROW_NUM 5 | ||
| 142 | #define ADP5585_MAX_COL_NUM 4 | ||
| 143 | |||
| 144 | #define ADP5585_ROW(x) (1 << ((x) & ADP5585_ROW_MASK)) | ||
| 145 | #define ADP5585_COL(x) (1 << (((x) & ADP5585_COL_MASK) + ADP5585_COL_SHIFT)) | ||
| 146 | |||
| 147 | /* Put one of these structures in i2c_board_info platform_data */ | ||
| 148 | 173 | ||
| 149 | struct adp5589_kpad_platform_data { | 174 | struct adp5589_kpad_platform_data { |
| 150 | unsigned keypad_en_mask; /* Keypad (Rows/Columns) enable mask */ | 175 | unsigned keypad_en_mask; /* Keypad (Rows/Columns) enable mask */ |
| 151 | const unsigned short *keymap; /* Pointer to keymap */ | 176 | const unsigned short *keymap; /* Pointer to keymap */ |
| 152 | unsigned short keymapsize; /* Keymap size */ | 177 | unsigned short keymapsize; /* Keymap size */ |
| 153 | bool repeat; /* Enable key repeat */ | 178 | bool repeat; /* Enable key repeat */ |
| 154 | bool en_keylock; /* Enable key lock feature (ADP5589 only)*/ | 179 | bool en_keylock; /* Enable key lock feature */ |
| 155 | unsigned char unlock_key1; /* Unlock Key 1 (ADP5589 only) */ | 180 | unsigned char unlock_key1; /* Unlock Key 1 */ |
| 156 | unsigned char unlock_key2; /* Unlock Key 2 (ADP5589 only) */ | 181 | unsigned char unlock_key2; /* Unlock Key 2 */ |
| 157 | unsigned char unlock_timer; /* Time in seconds [0..7] between the two unlock keys 0=disable (ADP5589 only) */ | 182 | unsigned char unlock_timer; /* Time in seconds [0..7] between the two unlock keys 0=disable */ |
| 158 | unsigned char scan_cycle_time; /* Time between consecutive scan cycles */ | 183 | unsigned char scan_cycle_time; /* Time between consecutive scan cycles */ |
| 159 | unsigned char reset_cfg; /* Reset config */ | 184 | unsigned char reset_cfg; /* Reset config */ |
| 160 | unsigned short reset1_key_1; /* Reset Key 1 */ | 185 | unsigned short reset1_key_1; /* Reset Key 1 */ |
diff --git a/include/linux/input/adxl34x.h b/include/linux/input/adxl34x.h index 57e01a7cb00..df00d998a44 100644 --- a/include/linux/input/adxl34x.h +++ b/include/linux/input/adxl34x.h | |||
| @@ -30,9 +30,8 @@ struct adxl34x_platform_data { | |||
| 30 | * Y, or Z participation in Tap detection. A '0' excludes the | 30 | * Y, or Z participation in Tap detection. A '0' excludes the |
| 31 | * selected axis from participation in Tap detection. | 31 | * selected axis from participation in Tap detection. |
| 32 | * Setting the SUPPRESS bit suppresses Double Tap detection if | 32 | * Setting the SUPPRESS bit suppresses Double Tap detection if |
| 33 | * acceleration greater than tap_threshold is present during the | 33 | * acceleration greater than tap_threshold is present between |
| 34 | * tap_latency period, i.e. after the first tap but before the | 34 | * taps. |
| 35 | * opening of the second tap window. | ||
| 36 | */ | 35 | */ |
| 37 | 36 | ||
| 38 | #define ADXL_SUPPRESS (1 << 3) | 37 | #define ADXL_SUPPRESS (1 << 3) |
| @@ -227,13 +226,13 @@ struct adxl34x_platform_data { | |||
| 227 | * detection will begin and prevent the detection of activity. This | 226 | * detection will begin and prevent the detection of activity. This |
| 228 | * bit serially links the activity and inactivity functions. When '0' | 227 | * bit serially links the activity and inactivity functions. When '0' |
| 229 | * the inactivity and activity functions are concurrent. Additional | 228 | * the inactivity and activity functions are concurrent. Additional |
| 230 | * information can be found in the ADXL34x datasheet's Application | 229 | * information can be found in the Application section under Link |
| 231 | * section under Link Mode. | 230 | * Mode. |
| 232 | * AUTO_SLEEP: A '1' sets the ADXL34x to switch to Sleep Mode | 231 | * AUTO_SLEEP: A '1' sets the ADXL34x to switch to Sleep Mode |
| 233 | * when inactivity (acceleration has been below inactivity_threshold | 232 | * when inactivity (acceleration has been below inactivity_threshold |
| 234 | * for at least inactivity_time) is detected and the LINK bit is set. | 233 | * for at least inactivity_time) is detected and the LINK bit is set. |
| 235 | * A '0' disables automatic switching to Sleep Mode. See the | 234 | * A '0' disables automatic switching to Sleep Mode. See SLEEP |
| 236 | * Sleep Bit section of the ADXL34x datasheet for more information. | 235 | * for further description. |
| 237 | */ | 236 | */ |
| 238 | 237 | ||
| 239 | #define ADXL_LINK (1 << 5) | 238 | #define ADXL_LINK (1 << 5) |
| @@ -267,12 +266,6 @@ struct adxl34x_platform_data { | |||
| 267 | 266 | ||
| 268 | u8 watermark; | 267 | u8 watermark; |
| 269 | 268 | ||
| 270 | /* | ||
| 271 | * When acceleration measurements are received from the ADXL34x | ||
| 272 | * events are sent to the event subsystem. The following settings | ||
| 273 | * select the event type and event code for new x, y and z axis data | ||
| 274 | * respectively. | ||
| 275 | */ | ||
| 276 | u32 ev_type; /* EV_ABS or EV_REL */ | 269 | u32 ev_type; /* EV_ABS or EV_REL */ |
| 277 | 270 | ||
| 278 | u32 ev_code_x; /* ABS_X,Y,Z or REL_X,Y,Z */ | 271 | u32 ev_code_x; /* ABS_X,Y,Z or REL_X,Y,Z */ |
| @@ -296,7 +289,7 @@ struct adxl34x_platform_data { | |||
| 296 | u32 ev_code_act_inactivity; /* EV_KEY */ | 289 | u32 ev_code_act_inactivity; /* EV_KEY */ |
| 297 | 290 | ||
| 298 | /* | 291 | /* |
| 299 | * Use ADXL34x INT2 pin instead of INT1 pin for interrupt output | 292 | * Use ADXL34x INT2 instead of INT1 |
| 300 | */ | 293 | */ |
| 301 | u8 use_int2; | 294 | u8 use_int2; |
| 302 | 295 | ||
diff --git a/include/linux/input/auo-pixcir-ts.h b/include/linux/input/auo-pixcir-ts.h deleted file mode 100644 index 75d4be71771..00000000000 --- a/include/linux/input/auo-pixcir-ts.h +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Driver for AUO in-cell touchscreens | ||
| 3 | * | ||
| 4 | * Copyright (c) 2011 Heiko Stuebner <heiko@sntech.de> | ||
| 5 | * | ||
| 6 | * based on auo_touch.h from Dell Streak kernel | ||
| 7 | * | ||
| 8 | * Copyright (c) 2008 QUALCOMM Incorporated. | ||
| 9 | * Copyright (c) 2008 QUALCOMM USA, INC. | ||
| 10 | * | ||
| 11 | * | ||
| 12 | * This software is licensed under the terms of the GNU General Public | ||
| 13 | * License version 2, as published by the Free Software Foundation, and | ||
| 14 | * may be copied, distributed, and modified under those terms. | ||
| 15 | * | ||
| 16 | * This program is distributed in the hope that it will be useful, | ||
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | * GNU General Public License for more details. | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __AUO_PIXCIR_TS_H__ | ||
| 24 | #define __AUO_PIXCIR_TS_H__ | ||
| 25 | |||
| 26 | /* | ||
| 27 | * Interrupt modes: | ||
| 28 | * periodical: interrupt is asserted periodicaly | ||
| 29 | * compare coordinates: interrupt is asserted when coordinates change | ||
| 30 | * indicate touch: interrupt is asserted during touch | ||
| 31 | */ | ||
| 32 | #define AUO_PIXCIR_INT_PERIODICAL 0x00 | ||
| 33 | #define AUO_PIXCIR_INT_COMP_COORD 0x01 | ||
| 34 | #define AUO_PIXCIR_INT_TOUCH_IND 0x02 | ||
| 35 | |||
| 36 | /* | ||
| 37 | * @gpio_int interrupt gpio | ||
| 38 | * @int_setting one of AUO_PIXCIR_INT_* | ||
| 39 | * @init_hw hardwarespecific init | ||
| 40 | * @exit_hw hardwarespecific shutdown | ||
| 41 | * @x_max x-resolution | ||
| 42 | * @y_max y-resolution | ||
| 43 | */ | ||
| 44 | struct auo_pixcir_ts_platdata { | ||
| 45 | int gpio_int; | ||
| 46 | |||
| 47 | int int_setting; | ||
| 48 | |||
| 49 | void (*init_hw)(struct i2c_client *); | ||
| 50 | void (*exit_hw)(struct i2c_client *); | ||
| 51 | |||
| 52 | unsigned int x_max; | ||
| 53 | unsigned int y_max; | ||
| 54 | }; | ||
| 55 | |||
| 56 | #endif | ||
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h index 6230d76bde5..05e03284b92 100644 --- a/include/linux/input/bu21013.h +++ b/include/linux/input/bu21013.h | |||
| @@ -9,10 +9,13 @@ | |||
| 9 | 9 | ||
| 10 | /** | 10 | /** |
| 11 | * struct bu21013_platform_device - Handle the platform data | 11 | * struct bu21013_platform_device - Handle the platform data |
| 12 | * @cs_en: pointer to the cs enable function | ||
| 13 | * @cs_dis: pointer to the cs disable function | ||
| 14 | * @irq_read_val: pointer to read the pen irq value function | ||
| 12 | * @touch_x_max: touch x max | 15 | * @touch_x_max: touch x max |
| 13 | * @touch_y_max: touch y max | 16 | * @touch_y_max: touch y max |
| 14 | * @cs_pin: chip select pin | 17 | * @cs_pin: chip select pin |
| 15 | * @touch_pin: touch gpio pin | 18 | * @irq: irq pin |
| 16 | * @ext_clk: external clock flag | 19 | * @ext_clk: external clock flag |
| 17 | * @x_flip: x flip flag | 20 | * @x_flip: x flip flag |
| 18 | * @y_flip: y flip flag | 21 | * @y_flip: y flip flag |
| @@ -21,10 +24,13 @@ | |||
| 21 | * This is used to handle the platform data | 24 | * This is used to handle the platform data |
| 22 | */ | 25 | */ |
| 23 | struct bu21013_platform_device { | 26 | struct bu21013_platform_device { |
| 27 | int (*cs_en)(int reset_pin); | ||
| 28 | int (*cs_dis)(int reset_pin); | ||
| 29 | int (*irq_read_val)(void); | ||
| 24 | int touch_x_max; | 30 | int touch_x_max; |
| 25 | int touch_y_max; | 31 | int touch_y_max; |
| 26 | unsigned int cs_pin; | 32 | unsigned int cs_pin; |
| 27 | unsigned int touch_pin; | 33 | unsigned int irq; |
| 28 | bool ext_clk; | 34 | bool ext_clk; |
| 29 | bool x_flip; | 35 | bool x_flip; |
| 30 | bool y_flip; | 36 | bool y_flip; |
diff --git a/include/linux/input/cyttsp.h b/include/linux/input/cyttsp.h deleted file mode 100644 index 5af7c66f1fc..00000000000 --- a/include/linux/input/cyttsp.h +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Header file for: | ||
| 3 | * Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers. | ||
| 4 | * For use with Cypress Txx3xx parts. | ||
| 5 | * Supported parts include: | ||
| 6 | * CY8CTST341 | ||
| 7 | * CY8CTMA340 | ||
| 8 | * | ||
| 9 | * Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc. | ||
| 10 | * Copyright (C) 2012 Javier Martinez Canillas <javier@dowhile0.org> | ||
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License | ||
| 14 | * version 2, and only version 2, as published by the | ||
| 15 | * Free Software Foundation. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License along | ||
| 23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 24 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 25 | * | ||
| 26 | * Contact Cypress Semiconductor at www.cypress.com (kev@cypress.com) | ||
| 27 | * | ||
| 28 | */ | ||
| 29 | #ifndef _CYTTSP_H_ | ||
| 30 | #define _CYTTSP_H_ | ||
| 31 | |||
| 32 | #define CY_SPI_NAME "cyttsp-spi" | ||
| 33 | #define CY_I2C_NAME "cyttsp-i2c" | ||
| 34 | /* Active Power state scanning/processing refresh interval */ | ||
| 35 | #define CY_ACT_INTRVL_DFLT 0x00 /* ms */ | ||
| 36 | /* touch timeout for the Active power */ | ||
| 37 | #define CY_TCH_TMOUT_DFLT 0xFF /* ms */ | ||
| 38 | /* Low Power state scanning/processing refresh interval */ | ||
| 39 | #define CY_LP_INTRVL_DFLT 0x0A /* ms */ | ||
| 40 | /* Active distance in pixels for a gesture to be reported */ | ||
| 41 | #define CY_ACT_DIST_DFLT 0xF8 /* pixels */ | ||
| 42 | |||
| 43 | struct cyttsp_platform_data { | ||
| 44 | u32 maxx; | ||
| 45 | u32 maxy; | ||
| 46 | bool use_hndshk; | ||
| 47 | u8 act_dist; /* Active distance */ | ||
| 48 | u8 act_intrvl; /* Active refresh interval; ms */ | ||
| 49 | u8 tch_tmout; /* Active touch timeout; ms */ | ||
| 50 | u8 lp_intrvl; /* Low power refresh interval; ms */ | ||
| 51 | int (*init)(void); | ||
| 52 | void (*exit)(void); | ||
| 53 | char *name; | ||
| 54 | s16 irq_gpio; | ||
| 55 | u8 *bl_keys; | ||
| 56 | }; | ||
| 57 | |||
| 58 | #endif /* _CYTTSP_H_ */ | ||
diff --git a/include/linux/input/edt-ft5x06.h b/include/linux/input/edt-ft5x06.h deleted file mode 100644 index 8a1e0d1a012..00000000000 --- a/include/linux/input/edt-ft5x06.h +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | #ifndef _EDT_FT5X06_H | ||
| 2 | #define _EDT_FT5X06_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Copyright (c) 2012 Simon Budig, <simon.budig@kernelconcepts.de> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | struct edt_ft5x06_platform_data { | ||
| 13 | int irq_pin; | ||
| 14 | int reset_pin; | ||
| 15 | |||
| 16 | /* startup defaults for operational parameters */ | ||
| 17 | bool use_parameters; | ||
| 18 | u8 gain; | ||
| 19 | u8 threshold; | ||
| 20 | u8 offset; | ||
| 21 | u8 report_rate; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #endif /* _EDT_FT5X06_H */ | ||
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h index 16625d799b6..f875b316249 100644 --- a/include/linux/input/eeti_ts.h +++ b/include/linux/input/eeti_ts.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define LINUX_INPUT_EETI_TS_H | 2 | #define LINUX_INPUT_EETI_TS_H |
| 3 | 3 | ||
| 4 | struct eeti_ts_platform_data { | 4 | struct eeti_ts_platform_data { |
| 5 | int irq_gpio; | ||
| 6 | unsigned int irq_active_high; | 5 | unsigned int irq_active_high; |
| 7 | }; | 6 | }; |
| 8 | 7 | ||
diff --git a/include/linux/input/gp2ap002a00f.h b/include/linux/input/gp2ap002a00f.h deleted file mode 100644 index aad2fd44a61..00000000000 --- a/include/linux/input/gp2ap002a00f.h +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | #ifndef _GP2AP002A00F_H_ | ||
| 2 | #define _GP2AP002A00F_H_ | ||
| 3 | |||
| 4 | #include <linux/i2c.h> | ||
| 5 | |||
| 6 | #define GP2A_I2C_NAME "gp2ap002a00f" | ||
| 7 | |||
| 8 | /** | ||
| 9 | * struct gp2a_platform_data - Sharp gp2ap002a00f proximity platform data | ||
| 10 | * @vout_gpio: The gpio connected to the object detected pin (VOUT) | ||
| 11 | * @wakeup: Set to true if the proximity can wake the device from suspend | ||
| 12 | * @hw_setup: Callback for setting up hardware such as gpios and vregs | ||
| 13 | * @hw_shutdown: Callback for properly shutting down hardware | ||
| 14 | */ | ||
| 15 | struct gp2a_platform_data { | ||
| 16 | int vout_gpio; | ||
| 17 | bool wakeup; | ||
| 18 | int (*hw_setup)(struct i2c_client *client); | ||
| 19 | int (*hw_shutdown)(struct i2c_client *client); | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/input/gpio_tilt.h b/include/linux/input/gpio_tilt.h deleted file mode 100644 index c1cc52d380e..00000000000 --- a/include/linux/input/gpio_tilt.h +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | #ifndef _INPUT_GPIO_TILT_H | ||
| 2 | #define _INPUT_GPIO_TILT_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct gpio_tilt_axis - Axis used by the tilt switch | ||
| 6 | * @axis: Constant describing the axis, e.g. ABS_X | ||
| 7 | * @min: minimum value for abs_param | ||
| 8 | * @max: maximum value for abs_param | ||
| 9 | * @fuzz: fuzz value for abs_param | ||
| 10 | * @flat: flat value for abs_param | ||
| 11 | */ | ||
| 12 | struct gpio_tilt_axis { | ||
| 13 | int axis; | ||
| 14 | int min; | ||
| 15 | int max; | ||
| 16 | int fuzz; | ||
| 17 | int flat; | ||
| 18 | }; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * struct gpio_tilt_state - state description | ||
| 22 | * @gpios: bitfield of gpio target-states for the value | ||
| 23 | * @axes: array containing the axes settings for the gpio state | ||
| 24 | * The array indizes must correspond to the axes defined | ||
| 25 | * in platform_data | ||
| 26 | * | ||
| 27 | * This structure describes a supported axis settings | ||
| 28 | * and the necessary gpio-state which represent it. | ||
| 29 | * | ||
| 30 | * The n-th bit in the bitfield describes the state of the n-th GPIO | ||
| 31 | * from the gpios-array defined in gpio_regulator_config below. | ||
| 32 | */ | ||
| 33 | struct gpio_tilt_state { | ||
| 34 | int gpios; | ||
| 35 | int *axes; | ||
| 36 | }; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * struct gpio_tilt_platform_data | ||
| 40 | * @gpios: Array containing the gpios determining the tilt state | ||
| 41 | * @nr_gpios: Number of gpios | ||
| 42 | * @axes: Array of gpio_tilt_axis descriptions | ||
| 43 | * @nr_axes: Number of axes | ||
| 44 | * @states: Array of gpio_tilt_state entries describing | ||
| 45 | * the gpio state for specific tilts | ||
| 46 | * @nr_states: Number of states available | ||
| 47 | * @debounce_interval: debounce ticks interval in msecs | ||
| 48 | * @poll_interval: polling interval in msecs - for polling driver only | ||
| 49 | * @enable: callback to enable the tilt switch | ||
| 50 | * @disable: callback to disable the tilt switch | ||
| 51 | * | ||
| 52 | * This structure contains gpio-tilt-switch configuration | ||
| 53 | * information that must be passed by platform code to the | ||
| 54 | * gpio-tilt input driver. | ||
| 55 | */ | ||
| 56 | struct gpio_tilt_platform_data { | ||
| 57 | struct gpio *gpios; | ||
| 58 | int nr_gpios; | ||
| 59 | |||
| 60 | struct gpio_tilt_axis *axes; | ||
| 61 | int nr_axes; | ||
| 62 | |||
| 63 | struct gpio_tilt_state *states; | ||
| 64 | int nr_states; | ||
| 65 | |||
| 66 | int debounce_interval; | ||
| 67 | |||
| 68 | unsigned int poll_interval; | ||
| 69 | int (*enable)(struct device *dev); | ||
| 70 | void (*disable)(struct device *dev); | ||
| 71 | }; | ||
| 72 | |||
| 73 | #endif | ||
diff --git a/include/linux/input/ili210x.h b/include/linux/input/ili210x.h deleted file mode 100644 index a5471245a13..00000000000 --- a/include/linux/input/ili210x.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #ifndef _ILI210X_H | ||
| 2 | #define _ILI210X_H | ||
| 3 | |||
| 4 | struct ili210x_platform_data { | ||
| 5 | unsigned long irq_flags; | ||
| 6 | unsigned int poll_period; | ||
| 7 | bool (*get_pendown_state)(void); | ||
| 8 | }; | ||
| 9 | |||
| 10 | #endif | ||
diff --git a/include/linux/input/kxtj9.h b/include/linux/input/kxtj9.h index d415579b56f..f6bac89537b 100644 --- a/include/linux/input/kxtj9.h +++ b/include/linux/input/kxtj9.h | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | 24 | ||
| 25 | struct kxtj9_platform_data { | 25 | struct kxtj9_platform_data { |
| 26 | unsigned int min_interval; /* minimum poll interval (in milli-seconds) */ | 26 | unsigned int min_interval; /* minimum poll interval (in milli-seconds) */ |
| 27 | unsigned int init_interval; /* initial poll interval (in milli-seconds) */ | ||
| 28 | 27 | ||
| 29 | /* | 28 | /* |
| 30 | * By default, x is axis 0, y is axis 1, z is axis 2; these can be | 29 | * By default, x is axis 0, y is axis 1, z is axis 2; these can be |
| @@ -53,6 +52,16 @@ struct kxtj9_platform_data { | |||
| 53 | #define KXTJ9_G_8G (1 << 4) | 52 | #define KXTJ9_G_8G (1 << 4) |
| 54 | u8 g_range; | 53 | u8 g_range; |
| 55 | 54 | ||
| 55 | /* DATA_CTRL_REG: controls the output data rate of the part */ | ||
| 56 | #define ODR12_5F 0 | ||
| 57 | #define ODR25F 1 | ||
| 58 | #define ODR50F 2 | ||
| 59 | #define ODR100F 3 | ||
| 60 | #define ODR200F 4 | ||
| 61 | #define ODR400F 5 | ||
| 62 | #define ODR800F 6 | ||
| 63 | u8 data_odr_init; | ||
| 64 | |||
| 56 | int (*init)(void); | 65 | int (*init)(void); |
| 57 | void (*exit)(void); | 66 | void (*exit)(void); |
| 58 | int (*power_on)(void); | 67 | int (*power_on)(void); |
diff --git a/include/linux/input/lm8333.h b/include/linux/input/lm8333.h deleted file mode 100644 index 79f918c6e8c..00000000000 --- a/include/linux/input/lm8333.h +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * public include for LM8333 keypad driver - same license as driver | ||
| 3 | * Copyright (C) 2012 Wolfram Sang, Pengutronix <w.sang@pengutronix.de> | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _LM8333_H | ||
| 7 | #define _LM8333_H | ||
| 8 | |||
| 9 | struct lm8333; | ||
| 10 | |||
| 11 | struct lm8333_platform_data { | ||
| 12 | /* Keymap data */ | ||
| 13 | const struct matrix_keymap_data *matrix_data; | ||
| 14 | /* Active timeout before enter HALT mode in microseconds */ | ||
| 15 | unsigned active_time; | ||
| 16 | /* Debounce interval in microseconds */ | ||
| 17 | unsigned debounce_time; | ||
| 18 | }; | ||
| 19 | |||
| 20 | extern int lm8333_read8(struct lm8333 *lm8333, u8 cmd); | ||
| 21 | extern int lm8333_write8(struct lm8333 *lm8333, u8 cmd, u8 val); | ||
| 22 | extern int lm8333_read_block(struct lm8333 *lm8333, u8 cmd, u8 len, u8 *buf); | ||
| 23 | |||
| 24 | #endif /* _LM8333_H */ | ||
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 5f3aa6b11bf..fe7c4b9ae27 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/input.h> | 5 | #include <linux/input.h> |
| 6 | #include <linux/of.h> | ||
| 7 | 6 | ||
| 8 | #define MATRIX_MAX_ROWS 32 | 7 | #define MATRIX_MAX_ROWS 32 |
| 9 | #define MATRIX_MAX_COLS 32 | 8 | #define MATRIX_MAX_COLS 32 |
| @@ -75,10 +74,36 @@ struct matrix_keypad_platform_data { | |||
| 75 | bool no_autorepeat; | 74 | bool no_autorepeat; |
| 76 | }; | 75 | }; |
| 77 | 76 | ||
| 78 | int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data, | 77 | /** |
| 79 | const char *keymap_name, | 78 | * matrix_keypad_build_keymap - convert platform keymap into matrix keymap |
| 80 | unsigned int rows, unsigned int cols, | 79 | * @keymap_data: keymap supplied by the platform code |
| 81 | unsigned short *keymap, | 80 | * @row_shift: number of bits to shift row value by to advance to the next |
| 82 | struct input_dev *input_dev); | 81 | * line in the keymap |
| 82 | * @keymap: expanded version of keymap that is suitable for use by | ||
| 83 | * matrix keyboad driver | ||
| 84 | * @keybit: pointer to bitmap of keys supported by input device | ||
| 85 | * | ||
| 86 | * This function converts platform keymap (encoded with KEY() macro) into | ||
| 87 | * an array of keycodes that is suitable for using in a standard matrix | ||
| 88 | * keyboard driver that uses row and col as indices. | ||
| 89 | */ | ||
| 90 | static inline void | ||
| 91 | matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data, | ||
| 92 | unsigned int row_shift, | ||
| 93 | unsigned short *keymap, unsigned long *keybit) | ||
| 94 | { | ||
| 95 | int i; | ||
| 96 | |||
| 97 | for (i = 0; i < keymap_data->keymap_size; i++) { | ||
| 98 | unsigned int key = keymap_data->keymap[i]; | ||
| 99 | unsigned int row = KEY_ROW(key); | ||
| 100 | unsigned int col = KEY_COL(key); | ||
| 101 | unsigned short code = KEY_VAL(key); | ||
| 102 | |||
| 103 | keymap[MATRIX_SCAN_CODE(row, col, row_shift)] = code; | ||
| 104 | __set_bit(code, keybit); | ||
| 105 | } | ||
| 106 | __clear_bit(KEY_RESERVED, keybit); | ||
| 107 | } | ||
| 83 | 108 | ||
| 84 | #endif /* _MATRIX_KEYPAD_H */ | 109 | #endif /* _MATRIX_KEYPAD_H */ |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index 2e86bd0bfba..318bb82325a 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
| @@ -15,41 +15,12 @@ | |||
| 15 | 15 | ||
| 16 | #define TRKID_MAX 0xffff | 16 | #define TRKID_MAX 0xffff |
| 17 | 17 | ||
| 18 | #define INPUT_MT_POINTER 0x0001 /* pointer device, e.g. trackpad */ | ||
| 19 | #define INPUT_MT_DIRECT 0x0002 /* direct device, e.g. touchscreen */ | ||
| 20 | #define INPUT_MT_DROP_UNUSED 0x0004 /* drop contacts not seen in frame */ | ||
| 21 | #define INPUT_MT_TRACK 0x0008 /* use in-kernel tracking */ | ||
| 22 | |||
| 23 | /** | 18 | /** |
| 24 | * struct input_mt_slot - represents the state of an input MT slot | 19 | * struct input_mt_slot - represents the state of an input MT slot |
| 25 | * @abs: holds current values of ABS_MT axes for this slot | 20 | * @abs: holds current values of ABS_MT axes for this slot |
| 26 | * @frame: last frame at which input_mt_report_slot_state() was called | ||
| 27 | * @key: optional driver designation of this slot | ||
| 28 | */ | 21 | */ |
| 29 | struct input_mt_slot { | 22 | struct input_mt_slot { |
| 30 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | 23 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; |
| 31 | unsigned int frame; | ||
| 32 | unsigned int key; | ||
| 33 | }; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * struct input_mt - state of tracked contacts | ||
| 37 | * @trkid: stores MT tracking ID for the next contact | ||
| 38 | * @num_slots: number of MT slots the device uses | ||
| 39 | * @slot: MT slot currently being transmitted | ||
| 40 | * @flags: input_mt operation flags | ||
| 41 | * @frame: increases every time input_mt_sync_frame() is called | ||
| 42 | * @red: reduced cost matrix for in-kernel tracking | ||
| 43 | * @slots: array of slots holding current values of tracked contacts | ||
| 44 | */ | ||
| 45 | struct input_mt { | ||
| 46 | int trkid; | ||
| 47 | int num_slots; | ||
| 48 | int slot; | ||
| 49 | unsigned int flags; | ||
| 50 | unsigned int frame; | ||
| 51 | int *red; | ||
| 52 | struct input_mt_slot slots[]; | ||
| 53 | }; | 24 | }; |
| 54 | 25 | ||
| 55 | static inline void input_mt_set_value(struct input_mt_slot *slot, | 26 | static inline void input_mt_set_value(struct input_mt_slot *slot, |
| @@ -64,24 +35,12 @@ static inline int input_mt_get_value(const struct input_mt_slot *slot, | |||
| 64 | return slot->abs[code - ABS_MT_FIRST]; | 35 | return slot->abs[code - ABS_MT_FIRST]; |
| 65 | } | 36 | } |
| 66 | 37 | ||
| 67 | static inline bool input_mt_is_active(const struct input_mt_slot *slot) | 38 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots); |
| 68 | { | ||
| 69 | return input_mt_get_value(slot, ABS_MT_TRACKING_ID) >= 0; | ||
| 70 | } | ||
| 71 | |||
| 72 | static inline bool input_mt_is_used(const struct input_mt *mt, | ||
| 73 | const struct input_mt_slot *slot) | ||
| 74 | { | ||
| 75 | return slot->frame == mt->frame; | ||
| 76 | } | ||
| 77 | |||
| 78 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, | ||
| 79 | unsigned int flags); | ||
| 80 | void input_mt_destroy_slots(struct input_dev *dev); | 39 | void input_mt_destroy_slots(struct input_dev *dev); |
| 81 | 40 | ||
| 82 | static inline int input_mt_new_trkid(struct input_mt *mt) | 41 | static inline int input_mt_new_trkid(struct input_dev *dev) |
| 83 | { | 42 | { |
| 84 | return mt->trkid++ & TRKID_MAX; | 43 | return dev->trkid++ & TRKID_MAX; |
| 85 | } | 44 | } |
| 86 | 45 | ||
| 87 | static inline void input_mt_slot(struct input_dev *dev, int slot) | 46 | static inline void input_mt_slot(struct input_dev *dev, int slot) |
| @@ -89,14 +48,10 @@ static inline void input_mt_slot(struct input_dev *dev, int slot) | |||
| 89 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); |
| 90 | } | 49 | } |
| 91 | 50 | ||
| 92 | static inline bool input_is_mt_value(int axis) | ||
| 93 | { | ||
| 94 | return axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST; | ||
| 95 | } | ||
| 96 | |||
| 97 | static inline bool input_is_mt_axis(int axis) | 51 | static inline bool input_is_mt_axis(int axis) |
| 98 | { | 52 | { |
| 99 | return axis == ABS_MT_SLOT || input_is_mt_value(axis); | 53 | return axis == ABS_MT_SLOT || |
| 54 | (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST); | ||
| 100 | } | 55 | } |
| 101 | 56 | ||
| 102 | void input_mt_report_slot_state(struct input_dev *dev, | 57 | void input_mt_report_slot_state(struct input_dev *dev, |
| @@ -105,20 +60,4 @@ void input_mt_report_slot_state(struct input_dev *dev, | |||
| 105 | void input_mt_report_finger_count(struct input_dev *dev, int count); | 60 | void input_mt_report_finger_count(struct input_dev *dev, int count); |
| 106 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); | 61 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); |
| 107 | 62 | ||
| 108 | void input_mt_sync_frame(struct input_dev *dev); | ||
| 109 | |||
| 110 | /** | ||
| 111 | * struct input_mt_pos - contact position | ||
| 112 | * @x: horizontal coordinate | ||
| 113 | * @y: vertical coordinate | ||
| 114 | */ | ||
| 115 | struct input_mt_pos { | ||
| 116 | s16 x, y; | ||
| 117 | }; | ||
| 118 | |||
| 119 | int input_mt_assign_slots(struct input_dev *dev, int *slots, | ||
| 120 | const struct input_mt_pos *pos, int num_pos); | ||
| 121 | |||
| 122 | int input_mt_get_slot_by_key(struct input_dev *dev, int key); | ||
| 123 | |||
| 124 | #endif | 63 | #endif |
diff --git a/include/linux/input/navpoint.h b/include/linux/input/navpoint.h deleted file mode 100644 index 45050eb34de..00000000000 --- a/include/linux/input/navpoint.h +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2012 Paul Parsons <lost.distance@yahoo.com> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | struct navpoint_platform_data { | ||
| 10 | int port; /* PXA SSP port for pxa_ssp_request() */ | ||
| 11 | int gpio; /* GPIO for power on/off */ | ||
| 12 | }; | ||
diff --git a/include/linux/input/pixcir_ts.h b/include/linux/input/pixcir_ts.h deleted file mode 100644 index 7163d91c037..00000000000 --- a/include/linux/input/pixcir_ts.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #ifndef _PIXCIR_I2C_TS_H | ||
| 2 | #define _PIXCIR_I2C_TS_H | ||
| 3 | |||
| 4 | struct pixcir_ts_platform_data { | ||
| 5 | int (*attb_read_val)(void); | ||
| 6 | int x_max; | ||
| 7 | int y_max; | ||
| 8 | }; | ||
| 9 | |||
| 10 | #endif | ||
diff --git a/include/linux/input/samsung-keypad.h b/include/linux/input/samsung-keypad.h deleted file mode 100644 index f25619bfd8a..00000000000 --- a/include/linux/input/samsung-keypad.h +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Samsung Keypad platform data definitions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | ||
| 5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __SAMSUNG_KEYPAD_H | ||
| 14 | #define __SAMSUNG_KEYPAD_H | ||
| 15 | |||
| 16 | #include <linux/input/matrix_keypad.h> | ||
| 17 | |||
| 18 | #define SAMSUNG_MAX_ROWS 8 | ||
| 19 | #define SAMSUNG_MAX_COLS 8 | ||
| 20 | |||
| 21 | /** | ||
| 22 | * struct samsung_keypad_platdata - Platform device data for Samsung Keypad. | ||
| 23 | * @keymap_data: pointer to &matrix_keymap_data. | ||
| 24 | * @rows: number of keypad row supported. | ||
| 25 | * @cols: number of keypad col supported. | ||
| 26 | * @no_autorepeat: disable key autorepeat. | ||
| 27 | * @wakeup: controls whether the device should be set up as wakeup source. | ||
| 28 | * @cfg_gpio: configure the GPIO. | ||
| 29 | * | ||
| 30 | * Initialisation data specific to either the machine or the platform | ||
| 31 | * for the device driver to use or call-back when configuring gpio. | ||
| 32 | */ | ||
| 33 | struct samsung_keypad_platdata { | ||
| 34 | const struct matrix_keymap_data *keymap_data; | ||
| 35 | unsigned int rows; | ||
| 36 | unsigned int cols; | ||
| 37 | bool no_autorepeat; | ||
| 38 | bool wakeup; | ||
| 39 | |||
| 40 | void (*cfg_gpio)(unsigned int rows, unsigned int cols); | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif /* __SAMSUNG_KEYPAD_H */ | ||
diff --git a/include/linux/input/tca8418_keypad.h b/include/linux/input/tca8418_keypad.h deleted file mode 100644 index e71a85dc2cb..00000000000 --- a/include/linux/input/tca8418_keypad.h +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * TCA8418 keypad platform support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Fuel7, Inc. All rights reserved. | ||
| 5 | * | ||
| 6 | * Author: Kyle Manna <kyle.manna@fuel7.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public | ||
| 10 | * License v2 as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public | ||
| 18 | * License along with this program; if not, write to the | ||
| 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 20 | * Boston, MA 021110-1307, USA. | ||
| 21 | * | ||
| 22 | * If you can't comply with GPLv2, alternative licensing terms may be | ||
| 23 | * arranged. Please contact Fuel7, Inc. (http://fuel7.com/) for proprietary | ||
| 24 | * alternative licensing inquiries. | ||
| 25 | */ | ||
| 26 | |||
| 27 | #ifndef _TCA8418_KEYPAD_H | ||
| 28 | #define _TCA8418_KEYPAD_H | ||
| 29 | |||
| 30 | #include <linux/types.h> | ||
| 31 | #include <linux/input/matrix_keypad.h> | ||
| 32 | |||
| 33 | #define TCA8418_I2C_ADDR 0x34 | ||
| 34 | #define TCA8418_NAME "tca8418_keypad" | ||
| 35 | |||
| 36 | struct tca8418_keypad_platform_data { | ||
| 37 | const struct matrix_keymap_data *keymap_data; | ||
| 38 | unsigned rows; | ||
| 39 | unsigned cols; | ||
| 40 | bool rep; | ||
| 41 | bool irq_is_gpio; | ||
| 42 | }; | ||
| 43 | |||
| 44 | #endif | ||
diff --git a/include/linux/input/tegra_kbc.h b/include/linux/input/tegra_kbc.h deleted file mode 100644 index a1302561293..00000000000 --- a/include/linux/input/tegra_kbc.h +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Platform definitions for tegra-kbc keyboard input driver | ||
| 3 | * | ||
| 4 | * Copyright (c) 2010-2011, NVIDIA Corporation. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along | ||
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef ASMARM_ARCH_TEGRA_KBC_H | ||
| 22 | #define ASMARM_ARCH_TEGRA_KBC_H | ||
| 23 | |||
| 24 | #include <linux/types.h> | ||
| 25 | #include <linux/input/matrix_keypad.h> | ||
| 26 | |||
| 27 | #define KBC_MAX_GPIO 24 | ||
| 28 | #define KBC_MAX_KPENT 8 | ||
| 29 | |||
| 30 | #define KBC_MAX_ROW 16 | ||
| 31 | #define KBC_MAX_COL 8 | ||
| 32 | #define KBC_MAX_KEY (KBC_MAX_ROW * KBC_MAX_COL) | ||
| 33 | |||
| 34 | enum tegra_pin_type { | ||
| 35 | PIN_CFG_IGNORE, | ||
| 36 | PIN_CFG_COL, | ||
| 37 | PIN_CFG_ROW, | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct tegra_kbc_pin_cfg { | ||
| 41 | enum tegra_pin_type type; | ||
| 42 | unsigned char num; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct tegra_kbc_wake_key { | ||
| 46 | u8 row:4; | ||
| 47 | u8 col:4; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct tegra_kbc_platform_data { | ||
| 51 | unsigned int debounce_cnt; | ||
| 52 | unsigned int repeat_cnt; | ||
| 53 | |||
| 54 | struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO]; | ||
| 55 | const struct matrix_keymap_data *keymap_data; | ||
| 56 | |||
| 57 | u32 wakeup_key; | ||
| 58 | bool wakeup; | ||
| 59 | bool use_fn_map; | ||
| 60 | bool use_ghost_filter; | ||
| 61 | }; | ||
| 62 | #endif | ||
diff --git a/include/linux/input/ti_am335x_tsc.h b/include/linux/input/ti_am335x_tsc.h deleted file mode 100644 index 49269a2aa32..00000000000 --- a/include/linux/input/ti_am335x_tsc.h +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | #ifndef __LINUX_TI_AM335X_TSC_H | ||
| 2 | #define __LINUX_TI_AM335X_TSC_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct tsc_data Touchscreen wire configuration | ||
| 6 | * @wires: Wires refer to application modes | ||
| 7 | * i.e. 4/5/8 wire touchscreen support | ||
| 8 | * on the platform. | ||
| 9 | * @x_plate_resistance: X plate resistance. | ||
| 10 | * @steps_to_configure: The sequencer supports a total of | ||
| 11 | * 16 programmable steps. | ||
| 12 | * A step configured to read a single | ||
| 13 | * co-ordinate value, can be applied | ||
| 14 | * more number of times for better results. | ||
| 15 | */ | ||
| 16 | |||
| 17 | struct tsc_data { | ||
| 18 | int wires; | ||
| 19 | int x_plate_resistance; | ||
| 20 | int steps_to_configure; | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif | ||
