diff options
| author | Olof Johansson <olof@lixom.net> | 2014-07-19 17:59:07 -0400 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2014-07-19 17:59:07 -0400 |
| commit | 4e9816d012dbc28dc89559261c6ffbf8ffc440dd (patch) | |
| tree | dee9f8b31f3d6d2fb141541da88e1cc1329b017e /include/linux/input | |
| parent | da98f44f27d81d7fe9a41f69af4fe08c18d13b56 (diff) | |
| parent | 1795cd9b3a91d4b5473c97f491d63892442212ab (diff) | |
Merge tag 'v3.16-rc5' into next/fixes-non-critical
Linux 3.16-rc5
Diffstat (limited to 'include/linux/input')
| -rw-r--r-- | include/linux/input/pixcir_ts.h | 44 | ||||
| -rw-r--r-- | include/linux/input/touchscreen.h | 22 |
2 files changed, 65 insertions, 1 deletions
diff --git a/include/linux/input/pixcir_ts.h b/include/linux/input/pixcir_ts.h index 7163d91c0373..160cf353aa39 100644 --- a/include/linux/input/pixcir_ts.h +++ b/include/linux/input/pixcir_ts.h | |||
| @@ -1,10 +1,52 @@ | |||
| 1 | #ifndef _PIXCIR_I2C_TS_H | 1 | #ifndef _PIXCIR_I2C_TS_H |
| 2 | #define _PIXCIR_I2C_TS_H | 2 | #define _PIXCIR_I2C_TS_H |
| 3 | 3 | ||
| 4 | /* | ||
| 5 | * Register map | ||
| 6 | */ | ||
| 7 | #define PIXCIR_REG_POWER_MODE 51 | ||
| 8 | #define PIXCIR_REG_INT_MODE 52 | ||
| 9 | |||
| 10 | /* | ||
| 11 | * Power modes: | ||
| 12 | * active: max scan speed | ||
| 13 | * idle: lower scan speed with automatic transition to active on touch | ||
| 14 | * halt: datasheet says sleep but this is more like halt as the chip | ||
| 15 | * clocks are cut and it can only be brought out of this mode | ||
| 16 | * using the RESET pin. | ||
| 17 | */ | ||
| 18 | enum pixcir_power_mode { | ||
| 19 | PIXCIR_POWER_ACTIVE, | ||
| 20 | PIXCIR_POWER_IDLE, | ||
| 21 | PIXCIR_POWER_HALT, | ||
| 22 | }; | ||
| 23 | |||
| 24 | #define PIXCIR_POWER_MODE_MASK 0x03 | ||
| 25 | #define PIXCIR_POWER_ALLOW_IDLE (1UL << 2) | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Interrupt modes: | ||
| 29 | * periodical: interrupt is asserted periodicaly | ||
| 30 | * diff coordinates: interrupt is asserted when coordinates change | ||
| 31 | * level on touch: interrupt level asserted during touch | ||
| 32 | * pulse on touch: interrupt pulse asserted druing touch | ||
| 33 | * | ||
| 34 | */ | ||
| 35 | enum pixcir_int_mode { | ||
| 36 | PIXCIR_INT_PERIODICAL, | ||
| 37 | PIXCIR_INT_DIFF_COORD, | ||
| 38 | PIXCIR_INT_LEVEL_TOUCH, | ||
| 39 | PIXCIR_INT_PULSE_TOUCH, | ||
| 40 | }; | ||
| 41 | |||
| 42 | #define PIXCIR_INT_MODE_MASK 0x03 | ||
| 43 | #define PIXCIR_INT_ENABLE (1UL << 3) | ||
| 44 | #define PIXCIR_INT_POL_HIGH (1UL << 2) | ||
| 45 | |||
| 4 | struct pixcir_ts_platform_data { | 46 | struct pixcir_ts_platform_data { |
| 5 | int (*attb_read_val)(void); | ||
| 6 | int x_max; | 47 | int x_max; |
| 7 | int y_max; | 48 | int y_max; |
| 49 | int gpio_attb; /* GPIO connected to ATTB line */ | ||
| 8 | }; | 50 | }; |
| 9 | 51 | ||
| 10 | #endif | 52 | #endif |
diff --git a/include/linux/input/touchscreen.h b/include/linux/input/touchscreen.h new file mode 100644 index 000000000000..08a5ef6e8f25 --- /dev/null +++ b/include/linux/input/touchscreen.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2014 Sebastian Reichel <sre@kernel.org> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms of the GNU General Public License version 2 as published by | ||
| 6 | * the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _TOUCHSCREEN_H | ||
| 10 | #define _TOUCHSCREEN_H | ||
| 11 | |||
| 12 | #include <linux/input.h> | ||
| 13 | |||
| 14 | #ifdef CONFIG_OF | ||
| 15 | void touchscreen_parse_of_params(struct input_dev *dev); | ||
| 16 | #else | ||
| 17 | static inline void touchscreen_parse_of_params(struct input_dev *dev) | ||
| 18 | { | ||
| 19 | } | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #endif | ||
