Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  ...
  • Loading branch information
Linus Torvalds committed Oct 7, 2016
2 parents d042380 + c758f96 commit d4e6547
Show file tree
Hide file tree
Showing 34 changed files with 1,033 additions and 519 deletions.
49 changes: 49 additions & 0 deletions Documentation/devicetree/bindings/input/adc-keys.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ADC attached resistor ladder buttons
------------------------------------

Required properties:
- compatible: "adc-keys"
- io-channels: Phandle to an ADC channel
- io-channel-names = "buttons";
- keyup-threshold-microvolt: Voltage at which all the keys are considered up.

Optional properties:
- poll-interval: Poll interval time in milliseconds
- autorepeat: Boolean, Enable auto repeat feature of Linux input
subsystem.

Each button (key) is represented as a sub-node of "adc-keys":

Required subnode-properties:
- label: Descriptive name of the key.
- linux,code: Keycode to emit.
- press-threshold-microvolt: Voltage ADC input when this key is pressed.

Example:

#include <dt-bindings/input/input.h>

adc-keys {
compatible = "adc-keys";
io-channels = <&lradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <2000000>;

button-up {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
press-threshold-microvolt = <1500000>;
};

button-down {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
press-threshold-microvolt = <1000000>;
};

button-enter {
label = "Enter";
linux,code = <KEY_ENTER>;
press-threshold-microvolt = <500000>;
};
};
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/input/gpio-decoder.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
* GPIO Decoder DT bindings

Required Properties:
- compatible: should be "gpio-decoder"
- gpios: a spec of gpios (at least two) to be decoded to a number with
first entry representing the MSB.

Optional Properties:
- decoder-max-value: Maximum possible value that can be reported by
the gpios.
- linux,axis: the input subsystem axis to map to (ABS_X/ABS_Y).
Defaults to 0 (ABS_X).

Example:
gpio-decoder0 {
compatible = "gpio-decoder";
gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
<&pca9536 2 GPIO_ACTIVE_HIGH>,
<&pca9536 1 GPIO_ACTIVE_HIGH>,
<&pca9536 0 GPIO_ACTIVE_HIGH>;
linux,axis = <0>; /* ABS_X */
decoder-max-value = <9>;
};
5 changes: 2 additions & 3 deletions Documentation/devicetree/bindings/input/gpio-keys-polled.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ Example nodes:

gpio_keys_polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <100>;
autorepeat;
button@21 {

button21 {
label = "GPIO Key UP";
linux,code = <103>;
gpios = <&gpio1 0 1>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Required properties:
or: "edt,edt-ft5306"
or: "edt,edt-ft5406"
or: "edt,edt-ft5506"
or: "focaltech,ft6236"

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

- offset: allows setting the edge compensation in the range from
0 to 31.
- touchscreen-size-x : See touchscreen.txt
- touchscreen-size-y : See touchscreen.txt
- touchscreen-fuzz-x : See touchscreen.txt
- touchscreen-fuzz-y : See touchscreen.txt
- touchscreen-inverted-x : See touchscreen.txt
- touchscreen-inverted-y : See touchscreen.txt
- touchscreen-swapped-x-y : See touchscreen.txt

Example:
polytouch: edt-ft5x06@38 {
Expand Down
27 changes: 27 additions & 0 deletions Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* Elan eKTF2127 I2C touchscreen controller

Required properties:
- compatible : "elan,ektf2127"
- reg : I2C slave address of the chip (0x40)
- interrupt-parent : a phandle pointing to the interrupt controller
serving the interrupt for this chip
- interrupts : interrupt specification for the ektf2127 interrupt
- power-gpios : GPIO specification for the pin connected to the
ektf2127's wake input. This needs to be driven high
to take ektf2127 out of it's low power state

For additional optional properties see: touchscreen.txt

Example:

i2c@00000000 {
ektf2127: touchscreen@15 {
compatible = "elan,ektf2127";
reg = <0x15>;
interrupt-parent = <&pio>;
interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>
power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};
};

This file was deleted.

17 changes: 14 additions & 3 deletions Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
Texas Instruments TPS65218 power button
Texas Instruments TPS65217 and TPS65218 power button

This module is part of the TPS65217/TPS65218. For more details about the whole
TPS65217 chip see Documentation/devicetree/bindings/regulator/tps65217.txt.

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

Required properties:
- compatible: should be "ti,tps65218-pwrbutton"
- compatible: should be "ti,tps65217-pwrbutton" or "ti,tps65218-pwrbutton"

Required properties for TPS65218:
- interrupts: should be one of the following
- <3 IRQ_TYPE_EDGE_BOTH>: For controllers compatible with tps65218

Example:
Examples:

&tps {
tps65217-pwrbutton {
compatible = "ti,tps65217-pwrbutton";
};
};

&tps {
power-button {
Expand Down
16 changes: 16 additions & 0 deletions arch/arm/mach-sa1100/jornada720.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/delay.h>
#include <linux/gpio/machine.h>
#include <linux/platform_data/sa11x0-serial.h>
#include <linux/platform_device.h>
#include <linux/ioport.h>
Expand Down Expand Up @@ -217,9 +218,22 @@ static struct platform_device jornada_ssp_device = {
.id = -1,
};

static struct resource jornada_kbd_resources[] = {
DEFINE_RES_IRQ(IRQ_GPIO0),
};

static struct platform_device jornada_kbd_device = {
.name = "jornada720_kbd",
.id = -1,
.num_resources = ARRAY_SIZE(jornada_kbd_resources),
.resource = jornada_kbd_resources,
};

static struct gpiod_lookup_table jornada_ts_gpiod_table = {
.dev_id = "jornada_ts",
.table = {
GPIO_LOOKUP("gpio", 9, "penup", GPIO_ACTIVE_HIGH),
},
};

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

gpiod_add_lookup_table(&jornada_ts_gpiod_table);

ret = platform_add_devices(devices, ARRAY_SIZE(devices));
}

Expand Down
15 changes: 15 additions & 0 deletions drivers/input/keyboard/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ menuconfig INPUT_KEYBOARD

if INPUT_KEYBOARD

config KEYBOARD_ADC
tristate "ADC Ladder Buttons"
depends on IIO
select INPUT_POLLDEV
help
This driver implements support for buttons connected
to an ADC using a resistor ladder.

Say Y here if your device has such buttons connected to an ADC. Your
board-specific setup logic must also provide a configuration data
for mapping voltages to buttons.

To compile this driver as a module, choose M here: the
module will be called adc_keys.

config KEYBOARD_ADP5520
tristate "Keypad Support for ADP5520 PMIC"
depends on PMIC_ADP5520
Expand Down
1 change: 1 addition & 0 deletions drivers/input/keyboard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Each configuration option enables a list of files.

obj-$(CONFIG_KEYBOARD_ADC) += adc-keys.o
obj-$(CONFIG_KEYBOARD_ADP5520) += adp5520-keys.o
obj-$(CONFIG_KEYBOARD_ADP5588) += adp5588-keys.o
obj-$(CONFIG_KEYBOARD_ADP5589) += adp5589-keys.o
Expand Down
Loading

0 comments on commit d4e6547

Please sign in to comment.