Skip to content

Commit dbe950f

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits) Input: tc3589x-keypad - add missing kerneldoc Input: ucb1400-ts - switch to using dev_xxx() for diagnostic messages Input: ucb1400_ts - convert to threaded IRQ Input: ucb1400_ts - drop inline annotations Input: usb1400_ts - add __devinit/__devexit section annotations Input: ucb1400_ts - set driver owner Input: ucb1400_ts - convert to use dev_pm_ops Input: psmouse - make sure we do not use stale methods Input: evdev - do not block waiting for an event if fd is nonblock Input: evdev - if no events and non-block, return EAGAIN not 0 Input: evdev - only allow reading events if a full packet is present Input: add driver for pixcir i2c touchscreens Input: samsung-keypad - implement runtime power management support Input: tegra-kbc - report wakeup key for some platforms Input: tegra-kbc - add device tree bindings Input: add driver for AUO In-Cell touchscreens using pixcir ICs Input: mpu3050 - configure the sampling method Input: mpu3050 - ensure we enable interrupts Input: mpu3050 - add of_match table for device-tree probing Input: sentelic - document the latest hardware ... Fix up fairly trivial conflicts (device tree matching conflicting with some independent cleanups) in drivers/input/keyboard/samsung-keypad.c
2 parents f62f619 + da73356 commit dbe950f

File tree

132 files changed

+5550
-1645
lines changed

Some content is hidden

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

132 files changed

+5550
-1645
lines changed

Documentation/ABI/testing/sysfs-driver-wacom

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Contact: [email protected]
1515
Description:
1616
Attribute group for control of the status LEDs and the OLEDs.
1717
This attribute group is only available for Intuos 4 M, L,
18-
and XL (with LEDs and OLEDs) and Cintiq 21UX2 (LEDs only).
19-
Therefore its presence implicitly signifies the presence of
20-
said LEDs and OLEDs on the tablet device.
18+
and XL (with LEDs and OLEDs) and Cintiq 21UX2 and Cintiq 24HD
19+
(LEDs only). Therefore its presence implicitly signifies the
20+
presence of said LEDs and OLEDs on the tablet device.
2121

2222
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status0_luminance
2323
Date: August 2011
@@ -41,16 +41,17 @@ Date: August 2011
4141
4242
Description:
4343
Writing to this file sets which one of the four (for Intuos 4)
44-
or of the right four (for Cintiq 21UX2) status LEDs is active (0..3).
45-
The other three LEDs on the same side are always inactive.
44+
or of the right four (for Cintiq 21UX2 and Cintiq 24HD) status
45+
LEDs is active (0..3). The other three LEDs on the same side are
46+
always inactive.
4647

4748
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led1_select
4849
Date: September 2011
4950
5051
Description:
51-
Writing to this file sets which one of the left four (for Cintiq 21UX2)
52-
status LEDs is active (0..3). The other three LEDs on the left are always
53-
inactive.
52+
Writing to this file sets which one of the left four (for Cintiq 21UX2
53+
and Cintiq 24HD) status LEDs is active (0..3). The other three LEDs on
54+
the left are always inactive.
5455

5556
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/buttons_luminance
5657
Date: August 2011
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* Tegra keyboard controller
2+
3+
Required properties:
4+
- compatible: "nvidia,tegra20-kbc"
5+
6+
Optional properties:
7+
- debounce-delay: delay in milliseconds per row scan for debouncing
8+
- repeat-delay: delay in milliseconds before repeat starts
9+
- ghost-filter: enable ghost filtering for this device
10+
- wakeup-source: configure keyboard as a wakeup source for suspend/resume
11+
12+
Example:
13+
14+
keyboard: keyboard {
15+
compatible = "nvidia,tegra20-kbc";
16+
reg = <0x7000e200 0x100>;
17+
ghost-filter;
18+
};

Documentation/input/alps.txt

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
ALPS Touchpad Protocol
2+
----------------------
3+
4+
Introduction
5+
------------
6+
7+
Currently the ALPS touchpad driver supports four protocol versions in use by
8+
ALPS touchpads, called versions 1, 2, 3, and 4. Information about the various
9+
protocol versions is contained in the following sections.
10+
11+
Detection
12+
---------
13+
14+
All ALPS touchpads should respond to the "E6 report" command sequence:
15+
E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
16+
00-00-64.
17+
18+
If the E6 report is successful, the touchpad model is identified using the "E7
19+
report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
20+
matched against known models in the alps_model_data_array.
21+
22+
With protocol versions 3 and 4, the E7 report model signature is always
23+
73-02-64. To differentiate between these versions, the response from the
24+
"Enter Command Mode" sequence must be inspected as described below.
25+
26+
Command Mode
27+
------------
28+
29+
Protocol versions 3 and 4 have a command mode that is used to read and write
30+
one-byte device registers in a 16-bit address space. The command sequence
31+
EC-EC-EC-E9 places the device in command mode, and the device will respond
32+
with 88-07 followed by a third byte. This third byte can be used to determine
33+
whether the devices uses the version 3 or 4 protocol.
34+
35+
To exit command mode, PSMOUSE_CMD_SETSTREAM (EA) is sent to the touchpad.
36+
37+
While in command mode, register addresses can be set by first sending a
38+
specific command, either EC for v3 devices or F5 for v4 devices. Then the
39+
address is sent one nibble at a time, where each nibble is encoded as a
40+
command with optional data. This enoding differs slightly between the v3 and
41+
v4 protocols.
42+
43+
Once an address has been set, the addressed register can be read by sending
44+
PSMOUSE_CMD_GETINFO (E9). The first two bytes of the response contains the
45+
address of the register being read, and the third contains the value of the
46+
register. Registers are written by writing the value one nibble at a time
47+
using the same encoding used for addresses.
48+
49+
Packet Format
50+
-------------
51+
52+
In the following tables, the following notation is used.
53+
54+
CAPITALS = stick, miniscules = touchpad
55+
56+
?'s can have different meanings on different models, such as wheel rotation,
57+
extra buttons, stick buttons on a dualpoint, etc.
58+
59+
PS/2 packet format
60+
------------------
61+
62+
byte 0: 0 0 YSGN XSGN 1 M R L
63+
byte 1: X7 X6 X5 X4 X3 X2 X1 X0
64+
byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
65+
66+
Note that the device never signals overflow condition.
67+
68+
ALPS Absolute Mode - Protocol Verion 1
69+
--------------------------------------
70+
71+
byte 0: 1 0 0 0 1 x9 x8 x7
72+
byte 1: 0 x6 x5 x4 x3 x2 x1 x0
73+
byte 2: 0 ? ? l r ? fin ges
74+
byte 3: 0 ? ? ? ? y9 y8 y7
75+
byte 4: 0 y6 y5 y4 y3 y2 y1 y0
76+
byte 5: 0 z6 z5 z4 z3 z2 z1 z0
77+
78+
ALPS Absolute Mode - Protocol Version 2
79+
---------------------------------------
80+
81+
byte 0: 1 ? ? ? 1 ? ? ?
82+
byte 1: 0 x6 x5 x4 x3 x2 x1 x0
83+
byte 2: 0 x10 x9 x8 x7 ? fin ges
84+
byte 3: 0 y9 y8 y7 1 M R L
85+
byte 4: 0 y6 y5 y4 y3 y2 y1 y0
86+
byte 5: 0 z6 z5 z4 z3 z2 z1 z0
87+
88+
Dualpoint device -- interleaved packet format
89+
---------------------------------------------
90+
91+
byte 0: 1 1 0 0 1 1 1 1
92+
byte 1: 0 x6 x5 x4 x3 x2 x1 x0
93+
byte 2: 0 x10 x9 x8 x7 0 fin ges
94+
byte 3: 0 0 YSGN XSGN 1 1 1 1
95+
byte 4: X7 X6 X5 X4 X3 X2 X1 X0
96+
byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
97+
byte 6: 0 y9 y8 y7 1 m r l
98+
byte 7: 0 y6 y5 y4 y3 y2 y1 y0
99+
byte 8: 0 z6 z5 z4 z3 z2 z1 z0
100+
101+
ALPS Absolute Mode - Protocol Version 3
102+
---------------------------------------
103+
104+
ALPS protocol version 3 has three different packet formats. The first two are
105+
associated with touchpad events, and the third is associatd with trackstick
106+
events.
107+
108+
The first type is the touchpad position packet.
109+
110+
byte 0: 1 ? x1 x0 1 1 1 1
111+
byte 1: 0 x10 x9 x8 x7 x6 x5 x4
112+
byte 2: 0 y10 y9 y8 y7 y6 y5 y4
113+
byte 3: 0 M R L 1 m r l
114+
byte 4: 0 mt x3 x2 y3 y2 y1 y0
115+
byte 5: 0 z6 z5 z4 z3 z2 z1 z0
116+
117+
Note that for some devices the trackstick buttons are reported in this packet,
118+
and on others it is reported in the trackstick packets.
119+
120+
The second packet type contains bitmaps representing the x and y axes. In the
121+
bitmaps a given bit is set if there is a finger covering that position on the
122+
given axis. Thus the bitmap packet can be used for low-resolution multi-touch
123+
data, although finger tracking is not possible. This packet also encodes the
124+
number of contacts (f1 and f0 in the table below).
125+
126+
byte 0: 1 1 x1 x0 1 1 1 1
127+
byte 1: 0 x8 x7 x6 x5 x4 x3 x2
128+
byte 2: 0 y7 y6 y5 y4 y3 y2 y1
129+
byte 3: 0 y10 y9 y8 1 1 1 1
130+
byte 4: 0 x14 x13 x12 x11 x10 x9 y0
131+
byte 5: 0 1 ? ? ? ? f1 f0
132+
133+
This packet only appears after a position packet with the mt bit set, and
134+
ususally only appears when there are two or more contacts (although
135+
ocassionally it's seen with only a single contact).
136+
137+
The final v3 packet type is the trackstick packet.
138+
139+
byte 0: 1 1 x7 y7 1 1 1 1
140+
byte 1: 0 x6 x5 x4 x3 x2 x1 x0
141+
byte 2: 0 y6 y5 y4 y3 y2 y1 y0
142+
byte 3: 0 1 0 0 1 0 0 0
143+
byte 4: 0 z4 z3 z2 z1 z0 ? ?
144+
byte 5: 0 0 1 1 1 1 1 1
145+
146+
ALPS Absolute Mode - Protocol Version 4
147+
---------------------------------------
148+
149+
Protocol version 4 has an 8-byte packet format.
150+
151+
byte 0: 1 ? x1 x0 1 1 1 1
152+
byte 1: 0 x10 x9 x8 x7 x6 x5 x4
153+
byte 2: 0 y10 y9 y8 y7 y6 y5 y4
154+
byte 3: 0 1 x3 x2 y3 y2 y1 y0
155+
byte 4: 0 ? ? ? 1 ? r l
156+
byte 5: 0 z6 z5 z4 z3 z2 z1 z0
157+
byte 6: bitmap data (described below)
158+
byte 7: bitmap data (described below)
159+
160+
The last two bytes represent a partial bitmap packet, with 3 full packets
161+
required to construct a complete bitmap packet. Once assembled, the 6-byte
162+
bitmap packet has the following format:
163+
164+
byte 0: 0 1 x7 x6 x5 x4 x3 x2
165+
byte 1: 0 x1 x0 y4 y3 y2 y1 y0
166+
byte 2: 0 0 ? x14 x13 x12 x11 x10
167+
byte 3: 0 x9 x8 y9 y8 y7 y6 y5
168+
byte 4: 0 0 0 0 0 0 0 0
169+
byte 5: 0 0 0 0 0 0 0 y10
170+
171+
There are several things worth noting here.
172+
173+
1) In the bitmap data, bit 6 of byte 0 serves as a sync byte to
174+
identify the first fragment of a bitmap packet.
175+
176+
2) The bitmaps represent the same data as in the v3 bitmap packets, although
177+
the packet layout is different.
178+
179+
3) There doesn't seem to be a count of the contact points anywhere in the v4
180+
protocol packets. Deriving a count of contact points must be done by
181+
analyzing the bitmaps.
182+
183+
4) There is a 3 to 1 ratio of position packets to bitmap packets. Therefore
184+
MT position can only be updated for every third ST position update, and
185+
the count of contact points can only be updated every third packet as
186+
well.
187+
188+
So far no v4 devices with tracksticks have been encountered.

Documentation/input/gpio-tilt.txt

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
Driver for tilt-switches connected via GPIOs
2+
============================================
3+
4+
Generic driver to read data from tilt switches connected via gpios.
5+
Orientation can be provided by one or more than one tilt switches,
6+
i.e. each tilt switch providing one axis, and the number of axes
7+
is also not limited.
8+
9+
10+
Data structures:
11+
----------------
12+
13+
The array of struct gpio in the gpios field is used to list the gpios
14+
that represent the current tilt state.
15+
16+
The array of struct gpio_tilt_axis describes the axes that are reported
17+
to the input system. The values set therein are used for the
18+
input_set_abs_params calls needed to init the axes.
19+
20+
The array of struct gpio_tilt_state maps gpio states to the corresponding
21+
values to report. The gpio state is represented as a bitfield where the
22+
bit-index corresponds to the index of the gpio in the struct gpio array.
23+
In the same manner the values stored in the axes array correspond to
24+
the elements of the gpio_tilt_axis-array.
25+
26+
27+
Example:
28+
--------
29+
30+
Example configuration for a single TS1003 tilt switch that rotates around
31+
one axis in 4 steps and emitts the current tilt via two GPIOs.
32+
33+
static int sg060_tilt_enable(struct device *dev) {
34+
/* code to enable the sensors */
35+
};
36+
37+
static void sg060_tilt_disable(struct device *dev) {
38+
/* code to disable the sensors */
39+
};
40+
41+
static struct gpio sg060_tilt_gpios[] = {
42+
{ SG060_TILT_GPIO_SENSOR1, GPIOF_IN, "tilt_sensor1" },
43+
{ SG060_TILT_GPIO_SENSOR2, GPIOF_IN, "tilt_sensor2" },
44+
};
45+
46+
static struct gpio_tilt_state sg060_tilt_states[] = {
47+
{
48+
.gpios = (0 << 1) | (0 << 0),
49+
.axes = (int[]) {
50+
0,
51+
},
52+
}, {
53+
.gpios = (0 << 1) | (1 << 0),
54+
.axes = (int[]) {
55+
1, /* 90 degrees */
56+
},
57+
}, {
58+
.gpios = (1 << 1) | (1 << 0),
59+
.axes = (int[]) {
60+
2, /* 180 degrees */
61+
},
62+
}, {
63+
.gpios = (1 << 1) | (0 << 0),
64+
.axes = (int[]) {
65+
3, /* 270 degrees */
66+
},
67+
},
68+
};
69+
70+
static struct gpio_tilt_axis sg060_tilt_axes[] = {
71+
{
72+
.axis = ABS_RY,
73+
.min = 0,
74+
.max = 3,
75+
.fuzz = 0,
76+
.flat = 0,
77+
},
78+
};
79+
80+
static struct gpio_tilt_platform_data sg060_tilt_pdata= {
81+
.gpios = sg060_tilt_gpios,
82+
.nr_gpios = ARRAY_SIZE(sg060_tilt_gpios),
83+
84+
.axes = sg060_tilt_axes,
85+
.nr_axes = ARRAY_SIZE(sg060_tilt_axes),
86+
87+
.states = sg060_tilt_states,
88+
.nr_states = ARRAY_SIZE(sg060_tilt_states),
89+
90+
.debounce_interval = 100,
91+
92+
.poll_interval = 1000,
93+
.enable = sg060_tilt_enable,
94+
.disable = sg060_tilt_disable,
95+
};
96+
97+
static struct platform_device sg060_device_tilt = {
98+
.name = "gpio-tilt-polled",
99+
.id = -1,
100+
.dev = {
101+
.platform_data = &sg060_tilt_pdata,
102+
},
103+
};

0 commit comments

Comments
 (0)