diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-09 21:46:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-09 21:46:02 -0400 |
commit | f4f9b8fc73f9aa93744f0e91e18f367d7766f523 (patch) | |
tree | 90d02c6722b0ffd8252ac438370600aaf8d814e7 /include/linux | |
parent | 9894e6d9c020b754dd962960e9f7eac18282f69f (diff) | |
parent | a292241cccb7e20e8b997a9a44177e7c98141859 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
"A big update to the Atmel touchscreen driver, devm support for polled
input devices, several drivers have been converted to using managed
resources, and assorted driver fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits)
Input: synaptics - fix resolution for manually provided min/max
Input: atmel_mxt_ts - fix invalid return from mxt_get_bootloader_version
Input: max8997_haptic - add error handling for regulator and pwm
Input: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is set
Input: elantech - deal with clickpads reporting right button events
Input: edt-ft5x06 - fix an i2c write for M09 support
Input: omap-keypad - remove platform data support
ARM: OMAP2+: remove unused omap4-keypad file and code
Input: ab8500-ponkey - switch to using managed resources
Input: max8925_onkey - switch to using managed resources
Input: 88pm860x-ts - switch to using managed resources
Input: 88pm860x_onkey - switch to using managed resources
Input: intel-mid-touch - switch to using managed resources
Input: wacom - process outbound for newer Cintiqs
Input: wacom - set stylus_in_proximity when pen is in range
DTS: ARM: OMAP3-N900: Add tsc2005 support
Input: tsc2005 - add DT support
Input: add common DT binding for touchscreens
Input: jornada680_kbd - switch top using managed resources
Input: adp5520-keys - switch to using managed resources
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/gpio_keys.h | 48 | ||||
-rw-r--r-- | include/linux/i2c/atmel_mxt_ts.h | 27 | ||||
-rw-r--r-- | include/linux/input-polldev.h | 3 | ||||
-rw-r--r-- | include/linux/input/pixcir_ts.h | 44 | ||||
-rw-r--r-- | include/linux/input/touchscreen.h | 22 | ||||
-rw-r--r-- | include/linux/platform_data/omap4-keypad.h | 13 |
6 files changed, 107 insertions, 50 deletions
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index a7e977ff4abf..8b622468952c 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
@@ -3,29 +3,53 @@ | |||
3 | 3 | ||
4 | struct device; | 4 | struct device; |
5 | 5 | ||
6 | /** | ||
7 | * struct gpio_keys_button - configuration parameters | ||
8 | * @code: input event code (KEY_*, SW_*) | ||
9 | * @gpio: %-1 if this key does not support gpio | ||
10 | * @active_low: %true indicates that button is considered | ||
11 | * depressed when gpio is low | ||
12 | * @desc: label that will be attached to button's gpio | ||
13 | * @type: input event type (%EV_KEY, %EV_SW, %EV_ABS) | ||
14 | * @wakeup: configure the button as a wake-up source | ||
15 | * @debounce_interval: debounce ticks interval in msecs | ||
16 | * @can_disable: %true indicates that userspace is allowed to | ||
17 | * disable button via sysfs | ||
18 | * @value: axis value for %EV_ABS | ||
19 | * @irq: Irq number in case of interrupt keys | ||
20 | */ | ||
6 | struct gpio_keys_button { | 21 | struct gpio_keys_button { |
7 | /* Configuration parameters */ | 22 | unsigned int code; |
8 | unsigned int code; /* input event code (KEY_*, SW_*) */ | 23 | int gpio; |
9 | int gpio; /* -1 if this key does not support gpio */ | ||
10 | int active_low; | 24 | int active_low; |
11 | const char *desc; | 25 | const char *desc; |
12 | unsigned int type; /* input event type (EV_KEY, EV_SW, EV_ABS) */ | 26 | unsigned int type; |
13 | int wakeup; /* configure the button as a wake-up source */ | 27 | int wakeup; |
14 | int debounce_interval; /* debounce ticks interval in msecs */ | 28 | int debounce_interval; |
15 | bool can_disable; | 29 | bool can_disable; |
16 | int value; /* axis value for EV_ABS */ | 30 | int value; |
17 | unsigned int irq; /* Irq number in case of interrupt keys */ | 31 | unsigned int irq; |
18 | }; | 32 | }; |
19 | 33 | ||
34 | /** | ||
35 | * struct gpio_keys_platform_data - platform data for gpio_keys driver | ||
36 | * @buttons: pointer to array of &gpio_keys_button structures | ||
37 | * describing buttons attached to the device | ||
38 | * @nbuttons: number of elements in @buttons array | ||
39 | * @poll_interval: polling interval in msecs - for polling driver only | ||
40 | * @rep: enable input subsystem auto repeat | ||
41 | * @enable: platform hook for enabling the device | ||
42 | * @disable: platform hook for disabling the device | ||
43 | * @name: input device name | ||
44 | */ | ||
20 | struct gpio_keys_platform_data { | 45 | struct gpio_keys_platform_data { |
21 | struct gpio_keys_button *buttons; | 46 | struct gpio_keys_button *buttons; |
22 | int nbuttons; | 47 | int nbuttons; |
23 | unsigned int poll_interval; /* polling interval in msecs - | 48 | unsigned int poll_interval; |
24 | for polling driver only */ | 49 | unsigned int rep:1; |
25 | unsigned int rep:1; /* enable input subsystem auto repeat */ | ||
26 | int (*enable)(struct device *dev); | 50 | int (*enable)(struct device *dev); |
27 | void (*disable)(struct device *dev); | 51 | void (*disable)(struct device *dev); |
28 | const char *name; /* input device name */ | 52 | const char *name; |
29 | }; | 53 | }; |
30 | 54 | ||
31 | #endif | 55 | #endif |
diff --git a/include/linux/i2c/atmel_mxt_ts.h b/include/linux/i2c/atmel_mxt_ts.h index 99e379b74398..3891dc1de21c 100644 --- a/include/linux/i2c/atmel_mxt_ts.h +++ b/include/linux/i2c/atmel_mxt_ts.h | |||
@@ -15,35 +15,14 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | /* For key_map array */ | ||
19 | #define MXT_NUM_GPIO 4 | ||
20 | |||
21 | /* Orient */ | ||
22 | #define MXT_NORMAL 0x0 | ||
23 | #define MXT_DIAGONAL 0x1 | ||
24 | #define MXT_HORIZONTAL_FLIP 0x2 | ||
25 | #define MXT_ROTATED_90_COUNTER 0x3 | ||
26 | #define MXT_VERTICAL_FLIP 0x4 | ||
27 | #define MXT_ROTATED_90 0x5 | ||
28 | #define MXT_ROTATED_180 0x6 | ||
29 | #define MXT_DIAGONAL_COUNTER 0x7 | ||
30 | |||
31 | /* The platform data for the Atmel maXTouch touchscreen driver */ | 18 | /* The platform data for the Atmel maXTouch touchscreen driver */ |
32 | struct mxt_platform_data { | 19 | struct mxt_platform_data { |
33 | const u8 *config; | 20 | const u8 *config; |
34 | size_t config_length; | 21 | size_t config_length; |
35 | 22 | u32 config_crc; | |
36 | unsigned int x_line; | ||
37 | unsigned int y_line; | ||
38 | unsigned int x_size; | ||
39 | unsigned int y_size; | ||
40 | unsigned int blen; | ||
41 | unsigned int threshold; | ||
42 | unsigned int voltage; | ||
43 | unsigned char orient; | ||
44 | unsigned long irqflags; | 23 | unsigned long irqflags; |
45 | bool is_tp; | 24 | u8 t19_num_keys; |
46 | const unsigned int key_map[MXT_NUM_GPIO]; | 25 | const unsigned int *t19_keymap; |
47 | }; | 26 | }; |
48 | 27 | ||
49 | #endif /* __LINUX_ATMEL_MXT_TS_H */ | 28 | #endif /* __LINUX_ATMEL_MXT_TS_H */ |
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index ce0b72464eb8..2465182670db 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h | |||
@@ -48,9 +48,12 @@ struct input_polled_dev { | |||
48 | 48 | ||
49 | /* private: */ | 49 | /* private: */ |
50 | struct delayed_work work; | 50 | struct delayed_work work; |
51 | |||
52 | bool devres_managed; | ||
51 | }; | 53 | }; |
52 | 54 | ||
53 | struct input_polled_dev *input_allocate_polled_device(void); | 55 | struct input_polled_dev *input_allocate_polled_device(void); |
56 | struct input_polled_dev *devm_input_allocate_polled_device(struct device *dev); | ||
54 | void input_free_polled_device(struct input_polled_dev *dev); | 57 | void input_free_polled_device(struct input_polled_dev *dev); |
55 | int input_register_polled_device(struct input_polled_dev *dev); | 58 | int input_register_polled_device(struct input_polled_dev *dev); |
56 | void input_unregister_polled_device(struct input_polled_dev *dev); | 59 | void input_unregister_polled_device(struct input_polled_dev *dev); |
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 | ||
diff --git a/include/linux/platform_data/omap4-keypad.h b/include/linux/platform_data/omap4-keypad.h deleted file mode 100644 index 4eef5fb05a17..000000000000 --- a/include/linux/platform_data/omap4-keypad.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __LINUX_INPUT_OMAP4_KEYPAD_H | ||
2 | #define __LINUX_INPUT_OMAP4_KEYPAD_H | ||
3 | |||
4 | #include <linux/input/matrix_keypad.h> | ||
5 | |||
6 | struct omap4_keypad_platform_data { | ||
7 | const struct matrix_keymap_data *keymap_data; | ||
8 | |||
9 | u8 rows; | ||
10 | u8 cols; | ||
11 | }; | ||
12 | |||
13 | #endif /* __LINUX_INPUT_OMAP4_KEYPAD_H */ | ||