Skip to content

Commit 31564cb

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull second round of input updates from Dmitry Torokhov: "As usual, there are a couple of new drivers, input core now supports managed input devices (devres), a slew of drivers now have device tree support and a bunch of fixes and cleanups." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (71 commits) Input: walkera0701 - fix crash on startup Input: matrix-keymap - provide a proper module license Input: gpio_keys_polled - switch to using gpio_request_one() Input: gpio_keys - switch to using gpio_request_one() Input: wacom - fix touch support for Bamboo Fun CTH-461 Input: xpad - add a few new VID/PID combinations Input: xpad - minor formatting fixes Input: gpio-keys-polled - honor 'autorepeat' setting in platform data Input: tca8418-keypad - switch to using managed resources Input: tca8418_keypad - increase severity of failures in probe() Input: tca8418_keypad - move device ID tables closer to where they are used Input: tca8418_keypad - use dev_get_platdata() to retrieve platform data Input: tca8418_keypad - use a temporary variable for parent device Input: tca8418_keypad - add support for shared interrupt Input: tca8418_keypad - add support for device tree bindings Input: remove Compaq iPAQ H3600 (Bitsy) touchscreen driver Input: bu21013_ts - add support for Device Tree booting Input: bu21013_ts - move GPIO init and exit functions into the driver Input: bu21013_ts - request regulator that actually exists ARM: ux500: Strip out duplicate touch screen platform information ...
2 parents 6842d98 + 022573c commit 31564cb

File tree

175 files changed

+2256
-1662
lines changed

Some content is hidden

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

175 files changed

+2256
-1662
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
* GPIO driven matrix keypad device tree bindings
2+
3+
GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
4+
The matrix keypad supports multiple row and column lines, a key can be
5+
placed at each intersection of a unique row and a unique column. The matrix
6+
keypad can sense a key-press and key-release by means of GPIO lines and
7+
report the event using GPIO interrupts to the cpu.
8+
9+
Required Properties:
10+
- compatible: Should be "gpio-matrix-keypad"
11+
- row-gpios: List of gpios used as row lines. The gpio specifier
12+
for this property depends on the gpio controller to
13+
which these row lines are connected.
14+
- col-gpios: List of gpios used as column lines. The gpio specifier
15+
for this property depends on the gpio controller to
16+
which these column lines are connected.
17+
- linux,keymap: The definition can be found at
18+
bindings/input/matrix-keymap.txt
19+
20+
Optional Properties:
21+
- linux,no-autorepeat: do no enable autorepeat feature.
22+
- linux,wakeup: use any event on keypad as wakeup event.
23+
- debounce-delay-ms: debounce interval in milliseconds
24+
- col-scan-delay-us: delay, measured in microseconds, that is needed
25+
before we can scan keypad after activating column gpio
26+
27+
Example:
28+
matrix-keypad {
29+
compatible = "gpio-matrix-keypad";
30+
debounce-delay-ms = <5>;
31+
col-scan-delay-us = <2>;
32+
33+
row-gpios = <&gpio2 25 0
34+
&gpio2 26 0
35+
&gpio2 27 0>;
36+
37+
col-gpios = <&gpio2 21 0
38+
&gpio2 22 0>;
39+
40+
linux,keymap = <0x0000008B
41+
0x0100009E
42+
0x02000069
43+
0x0001006A
44+
0x0101001C
45+
0x0201006C>;
46+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* PWM beeper device tree bindings
2+
3+
Registers a PWM device as beeper.
4+
5+
Required properties:
6+
- compatible: should be "pwm-beeper"
7+
- pwms: phandle to the physical PWM device
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
* STMPE Keypad
2+
3+
Required properties:
4+
- compatible : "st,stmpe-keypad"
5+
- linux,keymap : See ./matrix-keymap.txt
6+
7+
Optional properties:
8+
- debounce-interval : Debouncing interval time in milliseconds
9+
- st,scan-count : Scanning cycles elapsed before key data is updated
10+
- st,no-autorepeat : If specified device will not autorepeat
11+
12+
Example:
13+
14+
stmpe_keypad {
15+
compatible = "st,stmpe-keypad";
16+
17+
debounce-interval = <64>;
18+
st,scan-count = <8>;
19+
st,no-autorepeat;
20+
21+
linux,keymap = <0x205006b
22+
0x4010074
23+
0x3050072
24+
0x1030004
25+
0x502006a
26+
0x500000a
27+
0x5008b
28+
0x706001c
29+
0x405000b
30+
0x6070003
31+
0x3040067
32+
0x303006c
33+
0x60400e7
34+
0x602009e
35+
0x4020073
36+
0x5050002
37+
0x4030069
38+
0x3020008>;
39+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
Required properties:
3+
- compatible: "ti,tca8418"
4+
- reg: the I2C address
5+
- interrupts: IRQ line number, should trigger on falling edge
6+
- keypad,num-rows: The number of rows
7+
- keypad,num-columns: The number of columns
8+
- linux,keymap: Keys definitions, see keypad-matrix.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
* MELFAS MMS114 touchscreen controller
2+
3+
Required properties:
4+
- compatible: must be "melfas,mms114"
5+
- reg: I2C address of the chip
6+
- interrupts: interrupt to which the chip is connected
7+
- x-size: horizontal resolution of touchscreen
8+
- y-size: vertical resolution of touchscreen
9+
10+
Optional properties:
11+
- contact-threshold:
12+
- moving-threshold:
13+
- x-invert: invert X axis
14+
- y-invert: invert Y axis
15+
16+
Example:
17+
18+
i2c@00000000 {
19+
/* ... */
20+
21+
touchscreen@48 {
22+
compatible = "melfas,mms114";
23+
reg = <0x48>;
24+
interrupts = <39 0>;
25+
x-size = <720>;
26+
y-size = <1280>;
27+
contact-threshold = <10>;
28+
moving-threshold = <10>;
29+
x-invert;
30+
y-invert;
31+
};
32+
33+
/* ... */
34+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
STMPE Touchscreen
2+
----------------
3+
4+
Required properties:
5+
- compatible: "st,stmpe-ts"
6+
7+
Optional properties:
8+
- st,sample-time: ADC converstion time in number of clock. (0 -> 36 clocks, 1 ->
9+
44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, 5 -> 96 clocks, 6
10+
-> 144 clocks), recommended is 4.
11+
- st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC)
12+
- st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external
13+
reference)
14+
- st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz)
15+
- st,ave-ctrl: Sample average control (0 -> 1 sample, 1 -> 2 samples, 2 -> 4
16+
samples, 3 -> 8 samples)
17+
- st,touch-det-delay: Touch detect interrupt delay (0 -> 10 us, 1 -> 50 us, 2 ->
18+
100 us, 3 -> 500 us, 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms) recommended
19+
is 3
20+
- st,settling: Panel driver settling time (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3
21+
-> 1 ms, 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) recommended is 2
22+
- st,fraction-z: Length of the fractional part in z (fraction-z ([0..7]) = Count of
23+
the fractional part) recommended is 7
24+
- st,i-drive: current limit value of the touchscreen drivers (0 -> 20 mA typical 35
25+
mA max, 1 -> 50 mA typical 80 mA max)
26+
27+
Node name must be stmpe_touchscreen and should be child node of stmpe node to
28+
which it belongs.
29+
30+
Example:
31+
32+
stmpe_touchscreen {
33+
compatible = "st,stmpe-ts";
34+
st,sample-time = <4>;
35+
st,mod-12b = <1>;
36+
st,ref-sel = <0>;
37+
st,adc-freq = <1>;
38+
st,ave-ctrl = <1>;
39+
st,touch-det-delay = <2>;
40+
st,settling = <2>;
41+
st,fraction-z = <7>;
42+
st,i-drive = <1>;
43+
};

arch/arm/mach-omap1/board-nokia770.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,6 @@ static void __init mipid_dev_init(void)
112112
omapfb_set_lcd_config(&nokia770_lcd_config);
113113
}
114114

115-
static void __init ads7846_dev_init(void)
116-
{
117-
if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
118-
printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
119-
}
120-
121-
static int ads7846_get_pendown_state(void)
122-
{
123-
return !gpio_get_value(ADS7846_PENDOWN_GPIO);
124-
}
125-
126115
static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
127116
.x_max = 0x0fff,
128117
.y_max = 0x0fff,
@@ -131,7 +120,7 @@ static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata =
131120
.debounce_max = 10,
132121
.debounce_tol = 3,
133122
.debounce_rep = 1,
134-
.get_pendown_state = ads7846_get_pendown_state,
123+
.gpio_pendown = ADS7846_PENDOWN_GPIO,
135124
};
136125

137126
static struct spi_board_info nokia770_spi_board_info[] __initdata = {
@@ -241,7 +230,6 @@ static void __init omap_nokia770_init(void)
241230
omap_serial_init();
242231
omap_register_i2c_bus(1, 100, NULL, 0);
243232
hwa742_dev_init();
244-
ads7846_dev_init();
245233
mipid_dev_init();
246234
omap1_usb_init(&nokia770_usb_config);
247235
nokia770_mmc_init();

arch/arm/mach-ux500/board-mop500-stuib.c

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = {
7777
* BU21013 ROHM touchscreen interface on the STUIBs
7878
*/
7979

80-
/* tracks number of bu21013 devices being enabled */
81-
static int bu21013_devices;
82-
8380
#define TOUCH_GPIO_PIN 84
8481

8582
#define TOUCH_XMAX 384
@@ -88,73 +85,8 @@ static int bu21013_devices;
8885
#define PRCMU_CLOCK_OCR 0x1CC
8986
#define TSC_EXT_CLOCK_9_6MHZ 0x840000
9087

91-
/**
92-
* bu21013_gpio_board_init : configures the touch panel.
93-
* @reset_pin: reset pin number
94-
* This function can be used to configures
95-
* the voltage and reset the touch panel controller.
96-
*/
97-
static int bu21013_gpio_board_init(int reset_pin)
98-
{
99-
int retval = 0;
100-
101-
bu21013_devices++;
102-
if (bu21013_devices == 1) {
103-
retval = gpio_request(reset_pin, "touchp_reset");
104-
if (retval) {
105-
printk(KERN_ERR "Unable to request gpio reset_pin");
106-
return retval;
107-
}
108-
retval = gpio_direction_output(reset_pin, 1);
109-
if (retval < 0) {
110-
printk(KERN_ERR "%s: gpio direction failed\n",
111-
__func__);
112-
return retval;
113-
}
114-
}
115-
116-
return retval;
117-
}
118-
119-
/**
120-
* bu21013_gpio_board_exit : deconfigures the touch panel controller
121-
* @reset_pin: reset pin number
122-
* This function can be used to deconfigures the chip selection
123-
* for touch panel controller.
124-
*/
125-
static int bu21013_gpio_board_exit(int reset_pin)
126-
{
127-
int retval = 0;
128-
129-
if (bu21013_devices == 1) {
130-
retval = gpio_direction_output(reset_pin, 0);
131-
if (retval < 0) {
132-
printk(KERN_ERR "%s: gpio direction failed\n",
133-
__func__);
134-
return retval;
135-
}
136-
gpio_set_value(reset_pin, 0);
137-
}
138-
bu21013_devices--;
139-
140-
return retval;
141-
}
142-
143-
/**
144-
* bu21013_read_pin_val : get the interrupt pin value
145-
* This function can be used to get the interrupt pin value for touch panel
146-
* controller.
147-
*/
148-
static int bu21013_read_pin_val(void)
149-
{
150-
return gpio_get_value(TOUCH_GPIO_PIN);
151-
}
152-
15388
static struct bu21013_platform_device tsc_plat_device = {
154-
.cs_en = bu21013_gpio_board_init,
155-
.cs_dis = bu21013_gpio_board_exit,
156-
.irq_read_val = bu21013_read_pin_val,
157-
.irq = NOMADIK_GPIO_TO_IRQ(TOUCH_GPIO_PIN),
89+
.touch_pin = TOUCH_GPIO_PIN,
15890
.touch_x_max = TOUCH_XMAX,
15991
.touch_y_max = TOUCH_YMAX,
16092
.ext_clk = false,
@@ -171,7 +103,6 @@ static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = {
171103
I2C_BOARD_INFO("bu21013_tp", 0x5D),
172104
.platform_data = &tsc_plat_device,
173105
},
174-
175106
};
176107

177108
void __init mop500_stuib_init(void)

drivers/input/gameport/emu10k1-gp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static const struct pci_device_id emu_tbl[] = {
5757

5858
MODULE_DEVICE_TABLE(pci, emu_tbl);
5959

60-
static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
60+
static int emu_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
6161
{
6262
struct emu *emu;
6363
struct gameport *port;
@@ -107,7 +107,7 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
107107
return error;
108108
}
109109

110-
static void __devexit emu_remove(struct pci_dev *pdev)
110+
static void emu_remove(struct pci_dev *pdev)
111111
{
112112
struct emu *emu = pci_get_drvdata(pdev);
113113

@@ -122,7 +122,7 @@ static struct pci_driver emu_driver = {
122122
.name = "Emu10k1_gameport",
123123
.id_table = emu_tbl,
124124
.probe = emu_probe,
125-
.remove = __devexit_p(emu_remove),
125+
.remove = emu_remove,
126126
};
127127

128128
module_pci_driver(emu_driver);

drivers/input/gameport/fm801-gp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static int fm801_gp_open(struct gameport *gameport, int mode)
7878
return 0;
7979
}
8080

81-
static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device_id *id)
81+
static int fm801_gp_probe(struct pci_dev *pci, const struct pci_device_id *id)
8282
{
8383
struct fm801_gp *gp;
8484
struct gameport *port;
@@ -129,7 +129,7 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
129129
return error;
130130
}
131131

132-
static void __devexit fm801_gp_remove(struct pci_dev *pci)
132+
static void fm801_gp_remove(struct pci_dev *pci)
133133
{
134134
struct fm801_gp *gp = pci_get_drvdata(pci);
135135

@@ -150,7 +150,7 @@ static struct pci_driver fm801_gp_driver = {
150150
.name = "FM801_gameport",
151151
.id_table = fm801_gp_id_table,
152152
.probe = fm801_gp_probe,
153-
.remove = __devexit_p(fm801_gp_remove),
153+
.remove = fm801_gp_remove,
154154
};
155155

156156
module_pci_driver(fm801_gp_driver);

drivers/input/input-mt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count)
194194
if (!mt)
195195
return;
196196

197-
oldest = 0;
197+
oldest = NULL;
198198
oldid = mt->trkid;
199199
count = 0;
200200

0 commit comments

Comments
 (0)