Skip to content

Commit 0808882

Browse files
committed
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.8 merge window.
2 parents e9003c9 + 0097ff3 commit 0808882

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2932
-139
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Device tree bindings for Atmel capacitive touch device, typically
2+
an Atmel touch sensor connected to AtmegaXX MCU running firmware
3+
based on Qtouch library.
4+
5+
The node for this device must be a child of a I2C controller node, as the
6+
device communicates via I2C.
7+
8+
Required properties:
9+
10+
compatible: Must be "atmel,captouch".
11+
reg: The I2C slave address of the device.
12+
interrupts: Property describing the interrupt line the device
13+
is connected to. The device only has one interrupt
14+
source.
15+
linux,keycodes: Specifies an array of numeric keycode values to
16+
be used for reporting button presses. The array can
17+
contain up to 8 entries.
18+
19+
Optional properties:
20+
21+
autorepeat: Enables the Linux input system's autorepeat
22+
feature on the input device.
23+
24+
Example:
25+
26+
atmel-captouch@51 {
27+
compatible = "atmel,captouch";
28+
reg = <0x51>;
29+
interrupt-parent = <&tlmm>;
30+
interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
31+
linux,keycodes = <BTN_0>, <BTN_1>,
32+
<BTN_2>, <BTN_3>,
33+
<BTN_4>, <BTN_5>,
34+
<BTN_6>, <BTN_7>;
35+
autorepeat;
36+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Raydium I2C touchscreen
2+
3+
Required properties:
4+
- compatible: must be "raydium,rm32380"
5+
- reg: The I2C address of the device
6+
- interrupt-parent: the phandle for the interrupt controller
7+
- interrupts: interrupt to which the chip is connected
8+
See ../interrupt-controller/interrupts.txt
9+
Optional properties:
10+
- avdd-supply: analog power supply needed to power device
11+
- vccio-supply: IO Power source
12+
- reset-gpios: reset gpio the chip is connected to.
13+
14+
Example:
15+
touchscreen@39 {
16+
compatible = "raydium,rm32380";
17+
reg = <0x39>;
18+
interrupt-parent = <&gpio>;
19+
interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
20+
};

Documentation/devicetree/bindings/input/rmi4/rmi_i2c.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
2222
- syna,reset-delay-ms: The number of milliseconds to wait after resetting the
2323
device.
2424

25+
- syna,startup-delay-ms: The number of milliseconds to wait after powering on
26+
the device.
27+
28+
- vdd-supply: VDD power supply.
29+
See ../regulator/regulator.txt
30+
31+
- vio-supply: VIO power supply
32+
See ../regulator/regulator.txt
33+
2534
Function Parameters:
2635
Parameters specific to RMI functions are contained in child nodes of the rmi device
2736
node. Documentation for the parameters of each function can be found in:

Documentation/devicetree/bindings/vendor-prefixes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ raidsonic RaidSonic Technology GmbH
198198
ralink Mediatek/Ralink Technology Corp.
199199
ramtron Ramtron International
200200
raspberrypi Raspberry Pi Foundation
201+
raydium Raydium Semiconductor Corp.
201202
realtek Realtek Semiconductor Corp.
202203
renesas Renesas Electronics Corporation
203204
richtek Richtek Technology Corporation

drivers/input/input-mt.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,23 @@ void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count)
218218
}
219219

220220
input_event(dev, EV_KEY, BTN_TOUCH, count > 0);
221-
if (use_count)
221+
222+
if (use_count) {
223+
if (count == 0 &&
224+
!test_bit(ABS_MT_DISTANCE, dev->absbit) &&
225+
test_bit(ABS_DISTANCE, dev->absbit) &&
226+
input_abs_get_val(dev, ABS_DISTANCE) != 0) {
227+
/*
228+
* Force reporting BTN_TOOL_FINGER for devices that
229+
* only report general hover (and not per-contact
230+
* distance) when contact is in proximity but not
231+
* on the surface.
232+
*/
233+
count = 1;
234+
}
235+
222236
input_mt_report_finger_count(dev, count);
237+
}
223238

224239
if (oldest) {
225240
int x = input_mt_get_value(oldest, ABS_MT_POSITION_X);

drivers/input/input.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ static void input_pass_values(struct input_dev *dev,
153153

154154
rcu_read_unlock();
155155

156-
add_input_randomness(vals->type, vals->code, vals->value);
157-
158156
/* trigger auto repeat for key events */
159157
if (test_bit(EV_REP, dev->evbit) && test_bit(EV_KEY, dev->evbit)) {
160158
for (v = vals; v != vals + count; v++) {
@@ -371,9 +369,10 @@ static int input_get_disposition(struct input_dev *dev,
371369
static void input_handle_event(struct input_dev *dev,
372370
unsigned int type, unsigned int code, int value)
373371
{
374-
int disposition;
372+
int disposition = input_get_disposition(dev, type, code, &value);
375373

376-
disposition = input_get_disposition(dev, type, code, &value);
374+
if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
375+
add_input_randomness(type, code, value);
377376

378377
if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
379378
dev->event(dev, type, code, value);

drivers/input/keyboard/tc3589x-keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define TC3589x_PULL_DOWN_MASK 0x1
3333
#define TC3589x_PULL_UP_MASK 0x2
3434
#define TC3589x_PULLUP_ALL_MASK 0xAA
35-
#define TC3589x_IO_PULL_VAL(index, mask) ((mask)<<((index)%4)*2))
35+
#define TC3589x_IO_PULL_VAL(index, mask) ((mask)<<((index)%4)*2)
3636

3737
/* Bit masks for IOCFG register */
3838
#define IOCFG_BALLCFG 0x01

drivers/input/keyboard/tegra-kbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ static int tegra_kbc_parse_dt(struct tegra_kbc *kbc)
552552

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

drivers/input/misc/Kconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,20 @@ config INPUT_ARIZONA_HAPTICS
8282
To compile this driver as a module, choose M here: the
8383
module will be called arizona-haptics.
8484

85+
config INPUT_ATMEL_CAPTOUCH
86+
tristate "Atmel Capacitive Touch Button Driver"
87+
depends on OF || COMPILE_TEST
88+
depends on I2C
89+
help
90+
Say Y here if an Atmel Capacitive Touch Button device which
91+
implements "captouch" protocol is connected to I2C bus. Typically
92+
this device consists of Atmel Touch sensor controlled by AtMegaXX
93+
MCU running firmware based on Qtouch library.
94+
One should find "atmel,captouch" node in the board specific DTS.
95+
96+
To compile this driver as a module, choose M here: the
97+
module will be called atmel_captouch.
98+
8599
config INPUT_BMA150
86100
tristate "BMA150/SMB380 acceleration sensor support"
87101
depends on I2C
@@ -796,4 +810,13 @@ config INPUT_DRV2667_HAPTICS
796810
To compile this driver as a module, choose M here: the
797811
module will be called drv2667-haptics.
798812

813+
config INPUT_HISI_POWERKEY
814+
tristate "Hisilicon PMIC ONKEY support"
815+
depends on ARCH_HISI || COMPILE_TEST
816+
help
817+
Say Y to enable support for PMIC ONKEY.
818+
819+
To compile this driver as a module, choose M here: the
820+
module will be called hisi_powerkey.
821+
799822
endif

drivers/input/misc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ obj-$(CONFIG_INPUT_APANEL) += apanel.o
1717
obj-$(CONFIG_INPUT_ARIZONA_HAPTICS) += arizona-haptics.o
1818
obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
1919
obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
20+
obj-$(CONFIG_INPUT_ATMEL_CAPTOUCH) += atmel_captouch.o
2021
obj-$(CONFIG_INPUT_BFIN_ROTARY) += bfin_rotary.o
2122
obj-$(CONFIG_INPUT_BMA150) += bma150.o
2223
obj-$(CONFIG_INPUT_CM109) += cm109.o
@@ -34,6 +35,7 @@ obj-$(CONFIG_INPUT_DRV2667_HAPTICS) += drv2667.o
3435
obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o
3536
obj-$(CONFIG_INPUT_GPIO_BEEPER) += gpio-beeper.o
3637
obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o
38+
obj-$(CONFIG_INPUT_HISI_POWERKEY) += hisi_powerkey.o
3739
obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o
3840
obj-$(CONFIG_INPUT_IMS_PCU) += ims-pcu.o
3941
obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o

0 commit comments

Comments
 (0)