Skip to content

Commit 1b59bab

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: "Just a swath of driver fixes and cleanups, no new drivers this time (although ALPS now supports one of the newer protocols, more to come)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) Input: wacom - add support for DTU-1031 Input: wacom - fix wacom->shared guards for dual input devices Input: edt_ft5x06 - use devm_* functions where appropriate Input: hyperv-keyboard - pass through 0xE1 prefix Input: logips2pp - fix spelling s/reciver/receiver/ Input: delete non-required instances of include <linux/init.h> Input: twl4030-keypad - convert to using managed resources Input: twl6040-vibra - remove unneeded check for CONFIG_OF Input: twl4030-keypad - add device tree support Input: twl6040-vibra - add missing of_node_put Input: twl4030-vibra - add missing of_node_put Input: i8042 - cleanup SERIO_I8042 dependencies Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO on x86 Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO on unicore32 Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO on sparc Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO for SH_CAYMAN Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO on powerpc Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO on mips Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO on IA64 Input: i8042 - select ARCH_MIGHT_HAVE_PC_SERIO on ARM/Footbridge ...
2 parents b788769 + 55df811 commit 1b59bab

204 files changed

Lines changed: 1245 additions & 768 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* GPIO beeper device tree bindings
2+
3+
Register a beeper connected to GPIO pin.
4+
5+
Required properties:
6+
- compatible: Should be "gpio-beeper".
7+
- gpios: From common gpio binding; gpio connection to beeper enable pin.
8+
9+
Example:
10+
beeper: beeper {
11+
compatible = "gpio-beeper";
12+
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
13+
};
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
* Texas Instruments tsc2007 touchscreen controller
2+
3+
Required properties:
4+
- compatible: must be "ti,tsc2007".
5+
- reg: I2C address of the chip.
6+
- ti,x-plate-ohms: X-plate resistance in ohms.
7+
8+
Optional properties:
9+
- gpios: the interrupt gpio the chip is connected to (trough the penirq pin).
10+
The penirq pin goes to low when the panel is touched.
11+
(see GPIO binding[1] for more details).
12+
- interrupt-parent: the phandle for the gpio controller
13+
(see interrupt binding[0]).
14+
- interrupts: (gpio) interrupt to which the chip is connected
15+
(see interrupt binding[0]).
16+
- ti,max-rt: maximum pressure.
17+
- ti,fuzzx: specifies the absolute input fuzz x value.
18+
If set, it will permit noise in the data up to +- the value given to the fuzz
19+
parameter, that is used to filter noise from the event stream.
20+
- ti,fuzzy: specifies the absolute input fuzz y value.
21+
- ti,fuzzz: specifies the absolute input fuzz z value.
22+
- ti,poll-period: how much time to wait (in milliseconds) before reading again the
23+
values from the tsc2007.
24+
25+
[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
26+
[1]: Documentation/devicetree/bindings/gpio/gpio.txt
27+
28+
Example:
29+
&i2c1 {
30+
/* ... */
31+
tsc2007@49 {
32+
compatible = "ti,tsc2007";
33+
reg = <0x49>;
34+
interrupt-parent = <&gpio4>;
35+
interrupts = <0x0 0x8>;
36+
gpios = <&gpio4 0 0>;
37+
ti,x-plate-ohms = <180>;
38+
};
39+
40+
/* ... */
41+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
* TWL4030's Keypad Controller device tree bindings
2+
3+
TWL4030's Keypad controller is used to interface a SoC with a matrix-type
4+
keypad device. The keypad controller supports multiple row and column lines.
5+
A key can be placed at each intersection of a unique row and a unique column.
6+
The keypad controller can sense a key-press and key-release and report the
7+
event using a interrupt to the cpu.
8+
9+
This binding is based on the matrix-keymap binding with the following
10+
changes:
11+
12+
* keypad,num-rows and keypad,num-columns are required.
13+
14+
Required SoC Specific Properties:
15+
- compatible: should be one of the following
16+
- "ti,twl4030-keypad": For controllers compatible with twl4030 keypad
17+
controller.
18+
- interrupt: should be one of the following
19+
- <1>: For controllers compatible with twl4030 keypad controller.
20+
21+
Example:
22+
twl_keypad: keypad {
23+
compatible = "ti,twl4030-keypad";
24+
interrupts = <1>;
25+
keypad,num-rows = <8>;
26+
keypad,num-columns = <8>;
27+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Texas Instruments TWL family (twl4030) pwrbutton module
2+
3+
This module is part of the TWL4030. For more details about the whole
4+
chip see Documentation/devicetree/bindings/mfd/twl-familly.txt.
5+
6+
This module provides a simple power button event via an Interrupt.
7+
8+
Required properties:
9+
- compatible: should be one of the following
10+
- "ti,twl4030-pwrbutton": For controllers compatible with twl4030
11+
- interrupts: should be one of the following
12+
- <8>: For controllers compatible with twl4030
13+
14+
Example:
15+
16+
&twl {
17+
twl_pwrbutton: pwrbutton {
18+
compatible = "ti,twl4030-pwrbutton";
19+
interrupts = <8>;
20+
};
21+
};

‎Documentation/input/gamepad.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ features that you need, first. How each feature is mapped is described below.
6868
Legacy drivers often don't comply to these rules. As we cannot change them
6969
for backwards-compatibility reasons, you need to provide fixup mappings in
7070
user-space yourself. Some of them might also provide module-options that
71-
change the mappings so you can adivce users to set these.
71+
change the mappings so you can advise users to set these.
7272

7373
All new gamepads are supposed to comply with this mapping. Please report any
7474
bugs, if they don't.
@@ -150,10 +150,10 @@ Menu-Pad:
150150
BTN_START
151151
Many pads also have a third button which is branded or has a special symbol
152152
and meaning. Such buttons are mapped as BTN_MODE. Examples are the Nintendo
153-
"HOME" button, the XBox "X"-button or Sony "P" button.
153+
"HOME" button, the XBox "X"-button or Sony "PS" button.
154154

155155
Rumble:
156-
Rumble is adverticed as FF_RUMBLE.
156+
Rumble is advertised as FF_RUMBLE.
157157

158158
----------------------------------------------------------------------------
159159
Written 2013 by David Herrmann <dh.herrmann@gmail.com>

‎Documentation/input/joystick-api.txt‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ joystick.
1616

1717
By default, the device is opened in blocking mode.
1818

19-
int fd = open ("/dev/js0", O_RDONLY);
19+
int fd = open ("/dev/input/js0", O_RDONLY);
2020

2121

2222
2. Event Reading
2323
~~~~~~~~~~~~~~~~
2424

2525
struct js_event e;
26-
read (fd, &e, sizeof(struct js_event));
26+
read (fd, &e, sizeof(e));
2727

2828
where js_event is defined as
2929

@@ -34,8 +34,8 @@ where js_event is defined as
3434
__u8 number; /* axis/button number */
3535
};
3636

37-
If the read is successful, it will return sizeof(struct js_event), unless
38-
you wanted to read more than one event per read as described in section 3.1.
37+
If the read is successful, it will return sizeof(e), unless you wanted to read
38+
more than one event per read as described in section 3.1.
3939

4040

4141
2.1 js_event.type
@@ -99,9 +99,9 @@ may work well if you handle JS_EVENT_INIT events separately,
9999

100100
if ((js_event.type & ~JS_EVENT_INIT) == JS_EVENT_BUTTON) {
101101
if (js_event.value)
102-
buttons_state |= (1 << js_event.number);
103-
else
104-
buttons_state &= ~(1 << js_event.number);
102+
buttons_state |= (1 << js_event.number);
103+
else
104+
buttons_state &= ~(1 << js_event.number);
105105
}
106106

107107
is much safer since it can't lose sync with the driver. As you would
@@ -144,14 +144,14 @@ all events on the queue (that is, until you get a -1).
144144
For example,
145145

146146
while (1) {
147-
while (read (fd, &e, sizeof(struct js_event)) > 0) {
148-
process_event (e);
149-
}
150-
/* EAGAIN is returned when the queue is empty */
151-
if (errno != EAGAIN) {
152-
/* error */
153-
}
154-
/* do something interesting with processed events */
147+
while (read (fd, &e, sizeof(e)) > 0) {
148+
process_event (e);
149+
}
150+
/* EAGAIN is returned when the queue is empty */
151+
if (errno != EAGAIN) {
152+
/* error */
153+
}
154+
/* do something interesting with processed events */
155155
}
156156

157157
One reason for emptying the queue is that if it gets full you'll start
@@ -181,7 +181,7 @@ at a time using the typical read(2) functionality. For that, you would
181181
replace the read above with something like
182182

183183
struct js_event mybuffer[0xff];
184-
int i = read (fd, mybuffer, sizeof(struct mybuffer));
184+
int i = read (fd, mybuffer, sizeof(mybuffer));
185185

186186
In this case, read would return -1 if the queue was empty, or some
187187
other value in which the number of events read would be i /
@@ -269,9 +269,9 @@ The driver offers backward compatibility, though. Here's a quick summary:
269269
struct JS_DATA_TYPE js;
270270
while (1) {
271271
if (read (fd, &js, JS_RETURN) != JS_RETURN) {
272-
/* error */
273-
}
274-
usleep (1000);
272+
/* error */
273+
}
274+
usleep (1000);
275275
}
276276

277277
As you can figure out from the example, the read returns immediately,

‎Documentation/input/joystick.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ your needs:
116116
For testing the joystick driver functionality, there is the jstest
117117
program in the utilities package. You run it by typing:
118118

119-
jstest /dev/js0
119+
jstest /dev/input/js0
120120

121121
And it should show a line with the joystick values, which update as you
122122
move the stick, and press its buttons. The axes should all be zero when the
@@ -136,7 +136,7 @@ joystick should be autocalibrated by the driver automagically. However, with
136136
some analog joysticks, that either do not use linear resistors, or if you
137137
want better precision, you can use the jscal program
138138

139-
jscal -c /dev/js0
139+
jscal -c /dev/input/js0
140140

141141
included in the joystick package to set better correction coefficients than
142142
what the driver would choose itself.
@@ -145,7 +145,7 @@ what the driver would choose itself.
145145
calibration using the jstest command, and if you do, you then can save the
146146
correction coefficients into a file
147147

148-
jscal -p /dev/js0 > /etc/joystick.cal
148+
jscal -p /dev/input/js0 > /etc/joystick.cal
149149

150150
And add a line to your rc script executing that file
151151

@@ -556,7 +556,7 @@ interface, and "old" for the "0.x" interface. You run it by typing:
556556

557557
5. FAQ
558558
~~~~~~
559-
Q: Running 'jstest /dev/js0' results in "File not found" error. What's the
559+
Q: Running 'jstest /dev/input/js0' results in "File not found" error. What's the
560560
cause?
561561
A: The device files don't exist. Create them (see section 2.2).
562562

‎arch/alpha/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ config ALPHA
22
bool
33
default y
44
select ARCH_MIGHT_HAVE_PC_PARPORT
5+
select ARCH_MIGHT_HAVE_PC_SERIO
56
select HAVE_AOUT
67
select HAVE_IDE
78
select HAVE_OPROFILE

‎arch/arm/mach-footbridge/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ config FOOTBRIDGE
8585
# Footbridge in host mode
8686
config FOOTBRIDGE_HOST
8787
bool
88+
select ARCH_MIGHT_HAVE_PC_SERIO
8889

8990
# Footbridge in addin mode
9091
config FOOTBRIDGE_ADDIN

‎arch/arm/mach-imx/mach-cpuimx35.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static const struct imxi2c_platform_data
5353
};
5454

5555
#define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2)
56-
static int tsc2007_get_pendown_state(void)
56+
static int tsc2007_get_pendown_state(struct device *dev)
5757
{
5858
return !gpio_get_value(TSC2007_IRQGPIO);
5959
}

0 commit comments

Comments
 (0)