Skip to content

Commit

Permalink
Merge remote-tracking branch 'input/next' into sunxi-next
Browse files Browse the repository at this point in the history
  • Loading branch information
jwrdegoede committed Jul 16, 2016
2 parents 52f98ab + 0bb11e9 commit e825574
Show file tree
Hide file tree
Showing 40 changed files with 2,890 additions and 128 deletions.
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/input/atmel,captouch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Device tree bindings for Atmel capacitive touch device, typically
an Atmel touch sensor connected to AtmegaXX MCU running firmware
based on Qtouch library.

The node for this device must be a child of a I2C controller node, as the
device communicates via I2C.

Required properties:

compatible: Must be "atmel,captouch".
reg: The I2C slave address of the device.
interrupts: Property describing the interrupt line the device
is connected to. The device only has one interrupt
source.
linux,keycodes: Specifies an array of numeric keycode values to
be used for reporting button presses. The array can
contain up to 8 entries.

Optional properties:

autorepeat: Enables the Linux input system's autorepeat
feature on the input device.

Example:

atmel-captouch@51 {
compatible = "atmel,captouch";
reg = <0x51>;
interrupt-parent = <&tlmm>;
interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
linux,keycodes = <BTN_0>, <BTN_1>,
<BTN_2>, <BTN_3>,
<BTN_4>, <BTN_5>,
<BTN_6>, <BTN_7>;
autorepeat;
};
20 changes: 20 additions & 0 deletions Documentation/devicetree/bindings/input/raydium_i2c_ts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Raydium I2C touchscreen

Required properties:
- compatible: must be "raydium,rm32380"
- reg: The I2C address of the device
- interrupt-parent: the phandle for the interrupt controller
- interrupts: interrupt to which the chip is connected
See ../interrupt-controller/interrupts.txt
Optional properties:
- avdd-supply: analog power supply needed to power device
- vccio-supply: IO Power source
- reset-gpios: reset gpio the chip is connected to.

Example:
touchscreen@39 {
compatible = "raydium,rm32380";
reg = <0x39>;
interrupt-parent = <&gpio>;
interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
};
9 changes: 9 additions & 0 deletions Documentation/devicetree/bindings/input/rmi4/rmi_i2c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- syna,reset-delay-ms: The number of milliseconds to wait after resetting the
device.

- syna,startup-delay-ms: The number of milliseconds to wait after powering on
the device.

- vdd-supply: VDD power supply.
See ../regulator/regulator.txt

- vio-supply: VIO power supply
See ../regulator/regulator.txt

Function Parameters:
Parameters specific to RMI functions are contained in child nodes of the rmi device
node. Documentation for the parameters of each function can be found in:
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ raidsonic RaidSonic Technology GmbH
ralink Mediatek/Ralink Technology Corp.
ramtron Ramtron International
raspberrypi Raspberry Pi Foundation
raydium Raydium Semiconductor Corp.
realtek Realtek Semiconductor Corp.
renesas Renesas Electronics Corporation
richtek Richtek Technology Corporation
Expand Down
17 changes: 16 additions & 1 deletion drivers/input/input-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,23 @@ void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count)
}

input_event(dev, EV_KEY, BTN_TOUCH, count > 0);
if (use_count)

if (use_count) {
if (count == 0 &&
!test_bit(ABS_MT_DISTANCE, dev->absbit) &&
test_bit(ABS_DISTANCE, dev->absbit) &&
input_abs_get_val(dev, ABS_DISTANCE) != 0) {
/*
* Force reporting BTN_TOOL_FINGER for devices that
* only report general hover (and not per-contact
* distance) when contact is in proximity but not
* on the surface.
*/
count = 1;
}

input_mt_report_finger_count(dev, count);
}

if (oldest) {
int x = input_mt_get_value(oldest, ABS_MT_POSITION_X);
Expand Down
7 changes: 3 additions & 4 deletions drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ static void input_pass_values(struct input_dev *dev,

rcu_read_unlock();

add_input_randomness(vals->type, vals->code, vals->value);

/* trigger auto repeat for key events */
if (test_bit(EV_REP, dev->evbit) && test_bit(EV_KEY, dev->evbit)) {
for (v = vals; v != vals + count; v++) {
Expand Down Expand Up @@ -371,9 +369,10 @@ static int input_get_disposition(struct input_dev *dev,
static void input_handle_event(struct input_dev *dev,
unsigned int type, unsigned int code, int value)
{
int disposition;
int disposition = input_get_disposition(dev, type, code, &value);

disposition = input_get_disposition(dev, type, code, &value);
if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
add_input_randomness(type, code, value);

if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
dev->event(dev, type, code, value);
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/tc3589x-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define TC3589x_PULL_DOWN_MASK 0x1
#define TC3589x_PULL_UP_MASK 0x2
#define TC3589x_PULLUP_ALL_MASK 0xAA
#define TC3589x_IO_PULL_VAL(index, mask) ((mask)<<((index)%4)*2))
#define TC3589x_IO_PULL_VAL(index, mask) ((mask)<<((index)%4)*2)

/* Bit masks for IOCFG register */
#define IOCFG_BALLCFG 0x01
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/tegra-kbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ static int tegra_kbc_parse_dt(struct tegra_kbc *kbc)

if (!num_rows || !num_cols || ((num_rows + num_cols) > KBC_MAX_GPIO)) {
dev_err(kbc->dev,
"keypad rows/columns not porperly specified\n");
"keypad rows/columns not properly specified\n");
return -EINVAL;
}

Expand Down
23 changes: 23 additions & 0 deletions drivers/input/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ config INPUT_ARIZONA_HAPTICS
To compile this driver as a module, choose M here: the
module will be called arizona-haptics.

config INPUT_ATMEL_CAPTOUCH
tristate "Atmel Capacitive Touch Button Driver"
depends on OF || COMPILE_TEST
depends on I2C
help
Say Y here if an Atmel Capacitive Touch Button device which
implements "captouch" protocol is connected to I2C bus. Typically
this device consists of Atmel Touch sensor controlled by AtMegaXX
MCU running firmware based on Qtouch library.
One should find "atmel,captouch" node in the board specific DTS.

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

config INPUT_BMA150
tristate "BMA150/SMB380 acceleration sensor support"
depends on I2C
Expand Down Expand Up @@ -796,4 +810,13 @@ config INPUT_DRV2667_HAPTICS
To compile this driver as a module, choose M here: the
module will be called drv2667-haptics.

config INPUT_HISI_POWERKEY
tristate "Hisilicon PMIC ONKEY support"
depends on ARCH_HISI || COMPILE_TEST
help
Say Y to enable support for PMIC ONKEY.

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

endif
2 changes: 2 additions & 0 deletions drivers/input/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ obj-$(CONFIG_INPUT_APANEL) += apanel.o
obj-$(CONFIG_INPUT_ARIZONA_HAPTICS) += arizona-haptics.o
obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
obj-$(CONFIG_INPUT_ATMEL_CAPTOUCH) += atmel_captouch.o
obj-$(CONFIG_INPUT_BFIN_ROTARY) += bfin_rotary.o
obj-$(CONFIG_INPUT_BMA150) += bma150.o
obj-$(CONFIG_INPUT_CM109) += cm109.o
Expand All @@ -34,6 +35,7 @@ obj-$(CONFIG_INPUT_DRV2667_HAPTICS) += drv2667.o
obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o
obj-$(CONFIG_INPUT_GPIO_BEEPER) += gpio-beeper.o
obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o
obj-$(CONFIG_INPUT_HISI_POWERKEY) += hisi_powerkey.o
obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o
obj-$(CONFIG_INPUT_IMS_PCU) += ims-pcu.o
obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/misc/apanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static int __init apanel_init(void)

if (slave != i2c_addr) {
pr_notice(APANEL ": only one SMBus slave "
"address supported, skiping device...\n");
"address supported, skipping device...\n");
continue;
}

Expand Down
Loading

0 comments on commit e825574

Please sign in to comment.