Skip to content

Commit d4e6547

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem updates from Dmitry Torokhov: "You will get - a new driver for Elan eKTF2127 touchscreen controllers - a new "gpio-decoder" driver to read and report state of several GPIO lines - an ADC resistor ladder driver - the ft6326 driver is removed because edt-ft5x06 handles the same devices just fine. .. plus the regular slew of driver fixes/enhancements" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (26 commits) Input: elan_i2c - fix return tests of i2c_smbus_read_block_data() Input: ektf2127 - mark PM functions as __maybe_unused Input: snvs_pwrkey - drop input_free_device call if input_register_device fails Input: add support for Elan eKTF2127 touchscreen controller Input: serio - add hangup support Input: tps65218-pwrbutton - add support for tps65217 variant Input: jornada720_ts - get rid of mach/irqs.h and mach/hardware.h includes Input: jornada720_kbd - remove unneeded mach/hardware.h include Input: focaltech - mark focaltech_set_resolution() static Input: wdt87xx_i2c - fix the flash erase issue Input: gpio-keys-polled - don't use unit-address with button nodes Input: add generic input driver to read encoded GPIO lines Input: add ADC resistor ladder driver Input: pegasus_notetaker - directly include workqueue header Input: elants_i2c - get product id on recovery mode for FW update Input: wm97xx - remove deprecated create_singletheread_workqueue Input: mc13783_ts - remove deprecated create_singletheread_workqueue Input: psmouse - remove deprecated create_singletheread_workqueue Input: jornada720_kbd - switch to using dev_dbg Input: jornada720_kbd - get rid of mach/irqs.h include ...
2 parents d042380 + c758f96 commit d4e6547

34 files changed

Lines changed: 1033 additions & 519 deletions
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
ADC attached resistor ladder buttons
2+
------------------------------------
3+
4+
Required properties:
5+
- compatible: "adc-keys"
6+
- io-channels: Phandle to an ADC channel
7+
- io-channel-names = "buttons";
8+
- keyup-threshold-microvolt: Voltage at which all the keys are considered up.
9+
10+
Optional properties:
11+
- poll-interval: Poll interval time in milliseconds
12+
- autorepeat: Boolean, Enable auto repeat feature of Linux input
13+
subsystem.
14+
15+
Each button (key) is represented as a sub-node of "adc-keys":
16+
17+
Required subnode-properties:
18+
- label: Descriptive name of the key.
19+
- linux,code: Keycode to emit.
20+
- press-threshold-microvolt: Voltage ADC input when this key is pressed.
21+
22+
Example:
23+
24+
#include <dt-bindings/input/input.h>
25+
26+
adc-keys {
27+
compatible = "adc-keys";
28+
io-channels = <&lradc 0>;
29+
io-channel-names = "buttons";
30+
keyup-threshold-microvolt = <2000000>;
31+
32+
button-up {
33+
label = "Volume Up";
34+
linux,code = <KEY_VOLUMEUP>;
35+
press-threshold-microvolt = <1500000>;
36+
};
37+
38+
button-down {
39+
label = "Volume Down";
40+
linux,code = <KEY_VOLUMEDOWN>;
41+
press-threshold-microvolt = <1000000>;
42+
};
43+
44+
button-enter {
45+
label = "Enter";
46+
linux,code = <KEY_ENTER>;
47+
press-threshold-microvolt = <500000>;
48+
};
49+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* GPIO Decoder DT bindings
2+
3+
Required Properties:
4+
- compatible: should be "gpio-decoder"
5+
- gpios: a spec of gpios (at least two) to be decoded to a number with
6+
first entry representing the MSB.
7+
8+
Optional Properties:
9+
- decoder-max-value: Maximum possible value that can be reported by
10+
the gpios.
11+
- linux,axis: the input subsystem axis to map to (ABS_X/ABS_Y).
12+
Defaults to 0 (ABS_X).
13+
14+
Example:
15+
gpio-decoder0 {
16+
compatible = "gpio-decoder";
17+
gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
18+
<&pca9536 2 GPIO_ACTIVE_HIGH>,
19+
<&pca9536 1 GPIO_ACTIVE_HIGH>,
20+
<&pca9536 0 GPIO_ACTIVE_HIGH>;
21+
linux,axis = <0>; /* ABS_X */
22+
decoder-max-value = <9>;
23+
};

‎Documentation/devicetree/bindings/input/gpio-keys-polled.txt‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ Example nodes:
3434

3535
gpio_keys_polled {
3636
compatible = "gpio-keys-polled";
37-
#address-cells = <1>;
38-
#size-cells = <0>;
3937
poll-interval = <100>;
4038
autorepeat;
41-
button@21 {
39+
40+
button21 {
4241
label = "GPIO Key UP";
4342
linux,code = <103>;
4443
gpios = <&gpio1 0 1>;

‎Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Required properties:
1919
or: "edt,edt-ft5306"
2020
or: "edt,edt-ft5406"
2121
or: "edt,edt-ft5506"
22+
or: "focaltech,ft6236"
2223

2324
- reg: I2C slave address of the chip (0x38)
2425
- interrupt-parent: a phandle pointing to the interrupt controller
@@ -43,6 +44,13 @@ Optional properties:
4344

4445
- offset: allows setting the edge compensation in the range from
4546
0 to 31.
47+
- touchscreen-size-x : See touchscreen.txt
48+
- touchscreen-size-y : See touchscreen.txt
49+
- touchscreen-fuzz-x : See touchscreen.txt
50+
- touchscreen-fuzz-y : See touchscreen.txt
51+
- touchscreen-inverted-x : See touchscreen.txt
52+
- touchscreen-inverted-y : See touchscreen.txt
53+
- touchscreen-swapped-x-y : See touchscreen.txt
4654

4755
Example:
4856
polytouch: edt-ft5x06@38 {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
* Elan eKTF2127 I2C touchscreen controller
2+
3+
Required properties:
4+
- compatible : "elan,ektf2127"
5+
- reg : I2C slave address of the chip (0x40)
6+
- interrupt-parent : a phandle pointing to the interrupt controller
7+
serving the interrupt for this chip
8+
- interrupts : interrupt specification for the ektf2127 interrupt
9+
- power-gpios : GPIO specification for the pin connected to the
10+
ektf2127's wake input. This needs to be driven high
11+
to take ektf2127 out of it's low power state
12+
13+
For additional optional properties see: touchscreen.txt
14+
15+
Example:
16+
17+
i2c@00000000 {
18+
ektf2127: touchscreen@15 {
19+
compatible = "elan,ektf2127";
20+
reg = <0x15>;
21+
interrupt-parent = <&pio>;
22+
interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>
23+
power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;
24+
touchscreen-inverted-x;
25+
touchscreen-swapped-x-y;
26+
};
27+
};

‎Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt‎

Lines changed: 0 additions & 35 deletions
This file was deleted.

‎Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1-
Texas Instruments TPS65218 power button
1+
Texas Instruments TPS65217 and TPS65218 power button
2+
3+
This module is part of the TPS65217/TPS65218. For more details about the whole
4+
TPS65217 chip see Documentation/devicetree/bindings/regulator/tps65217.txt.
25

36
This driver provides a simple power button event via an Interrupt.
47

58
Required properties:
6-
- compatible: should be "ti,tps65218-pwrbutton"
9+
- compatible: should be "ti,tps65217-pwrbutton" or "ti,tps65218-pwrbutton"
10+
11+
Required properties for TPS65218:
712
- interrupts: should be one of the following
813
- <3 IRQ_TYPE_EDGE_BOTH>: For controllers compatible with tps65218
914

10-
Example:
15+
Examples:
16+
17+
&tps {
18+
tps65217-pwrbutton {
19+
compatible = "ti,tps65217-pwrbutton";
20+
};
21+
};
1122

1223
&tps {
1324
power-button {

‎arch/arm/mach-sa1100/jornada720.c‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/kernel.h>
1818
#include <linux/tty.h>
1919
#include <linux/delay.h>
20+
#include <linux/gpio/machine.h>
2021
#include <linux/platform_data/sa11x0-serial.h>
2122
#include <linux/platform_device.h>
2223
#include <linux/ioport.h>
@@ -217,9 +218,22 @@ static struct platform_device jornada_ssp_device = {
217218
.id = -1,
218219
};
219220

221+
static struct resource jornada_kbd_resources[] = {
222+
DEFINE_RES_IRQ(IRQ_GPIO0),
223+
};
224+
220225
static struct platform_device jornada_kbd_device = {
221226
.name = "jornada720_kbd",
222227
.id = -1,
228+
.num_resources = ARRAY_SIZE(jornada_kbd_resources),
229+
.resource = jornada_kbd_resources,
230+
};
231+
232+
static struct gpiod_lookup_table jornada_ts_gpiod_table = {
233+
.dev_id = "jornada_ts",
234+
.table = {
235+
GPIO_LOOKUP("gpio", 9, "penup", GPIO_ACTIVE_HIGH),
236+
},
223237
};
224238

225239
static struct platform_device jornada_ts_device = {
@@ -250,6 +264,8 @@ static int __init jornada720_init(void)
250264
GPSR = GPIO_GPIO20; /* restart gpio20 */
251265
udelay(20); /* give it some time to restart */
252266

267+
gpiod_add_lookup_table(&jornada_ts_gpiod_table);
268+
253269
ret = platform_add_devices(devices, ARRAY_SIZE(devices));
254270
}
255271

‎drivers/input/keyboard/Kconfig‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ menuconfig INPUT_KEYBOARD
1212

1313
if INPUT_KEYBOARD
1414

15+
config KEYBOARD_ADC
16+
tristate "ADC Ladder Buttons"
17+
depends on IIO
18+
select INPUT_POLLDEV
19+
help
20+
This driver implements support for buttons connected
21+
to an ADC using a resistor ladder.
22+
23+
Say Y here if your device has such buttons connected to an ADC. Your
24+
board-specific setup logic must also provide a configuration data
25+
for mapping voltages to buttons.
26+
27+
To compile this driver as a module, choose M here: the
28+
module will be called adc_keys.
29+
1530
config KEYBOARD_ADP5520
1631
tristate "Keypad Support for ADP5520 PMIC"
1732
depends on PMIC_ADP5520

‎drivers/input/keyboard/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# Each configuration option enables a list of files.
66

7+
obj-$(CONFIG_KEYBOARD_ADC) += adc-keys.o
78
obj-$(CONFIG_KEYBOARD_ADP5520) += adp5520-keys.o
89
obj-$(CONFIG_KEYBOARD_ADP5588) += adp5588-keys.o
910
obj-$(CONFIG_KEYBOARD_ADP5589) += adp5589-keys.o

0 commit comments

Comments
 (0)