diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/omap-keypad.c | 8 | ||||
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/sh_keysc.c | 28 | ||||
-rw-r--r-- | drivers/input/misc/Kconfig | 7 | ||||
-rw-r--r-- | drivers/input/misc/Makefile | 1 | ||||
-rw-r--r-- | drivers/input/misc/apanel.c | 81 | ||||
-rw-r--r-- | drivers/input/misc/pcf50633-input.c | 132 | ||||
-rw-r--r-- | drivers/input/mouse/pxa930_trkball.c | 4 | ||||
-rw-r--r-- | drivers/input/serio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 4 | ||||
-rw-r--r-- | drivers/input/touchscreen/da9034-ts.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/mainstone-wm97xx.c | 2 |
13 files changed, 203 insertions, 71 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 6df9ba186121..45470f18d7e9 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(extra, "Enable extra LEDs and keys on IBM RapidAcces, EzKey and | |||
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Scancode to keycode tables. These are just the default setting, and | 67 | * Scancode to keycode tables. These are just the default setting, and |
68 | * are loadable via an userland utility. | 68 | * are loadable via a userland utility. |
69 | */ | 69 | */ |
70 | 70 | ||
71 | static const unsigned short atkbd_set2_keycode[512] = { | 71 | static const unsigned short atkbd_set2_keycode[512] = { |
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 23b4fd18f851..058fa8b02c21 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c | |||
@@ -101,7 +101,7 @@ static irqreturn_t omap_kp_interrupt(int irq, void *dev_id) | |||
101 | if (cpu_is_omap24xx()) { | 101 | if (cpu_is_omap24xx()) { |
102 | int i; | 102 | int i; |
103 | for (i = 0; i < omap_kp->rows; i++) | 103 | for (i = 0; i < omap_kp->rows; i++) |
104 | disable_irq(OMAP_GPIO_IRQ(row_gpios[i])); | 104 | disable_irq(gpio_to_irq(row_gpios[i])); |
105 | } else | 105 | } else |
106 | /* disable keyboard interrupt and schedule for handling */ | 106 | /* disable keyboard interrupt and schedule for handling */ |
107 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 107 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
@@ -220,7 +220,7 @@ static void omap_kp_tasklet(unsigned long data) | |||
220 | if (cpu_is_omap24xx()) { | 220 | if (cpu_is_omap24xx()) { |
221 | int i; | 221 | int i; |
222 | for (i = 0; i < omap_kp_data->rows; i++) | 222 | for (i = 0; i < omap_kp_data->rows; i++) |
223 | enable_irq(OMAP_GPIO_IRQ(row_gpios[i])); | 223 | enable_irq(gpio_to_irq(row_gpios[i])); |
224 | } else { | 224 | } else { |
225 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 225 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
226 | kp_cur_group = -1; | 226 | kp_cur_group = -1; |
@@ -393,7 +393,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) | |||
393 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 393 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
394 | } else { | 394 | } else { |
395 | for (irq_idx = 0; irq_idx < omap_kp->rows; irq_idx++) { | 395 | for (irq_idx = 0; irq_idx < omap_kp->rows; irq_idx++) { |
396 | if (request_irq(OMAP_GPIO_IRQ(row_gpios[irq_idx]), | 396 | if (request_irq(gpio_to_irq(row_gpios[irq_idx]), |
397 | omap_kp_interrupt, | 397 | omap_kp_interrupt, |
398 | IRQF_TRIGGER_FALLING, | 398 | IRQF_TRIGGER_FALLING, |
399 | "omap-keypad", omap_kp) < 0) | 399 | "omap-keypad", omap_kp) < 0) |
@@ -434,7 +434,7 @@ static int __devexit omap_kp_remove(struct platform_device *pdev) | |||
434 | gpio_free(col_gpios[i]); | 434 | gpio_free(col_gpios[i]); |
435 | for (i = 0; i < omap_kp->rows; i++) { | 435 | for (i = 0; i < omap_kp->rows; i++) { |
436 | gpio_free(row_gpios[i]); | 436 | gpio_free(row_gpios[i]); |
437 | free_irq(OMAP_GPIO_IRQ(row_gpios[i]), 0); | 437 | free_irq(gpio_to_irq(row_gpios[i]), 0); |
438 | } | 438 | } |
439 | } else { | 439 | } else { |
440 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 440 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 6d30c6d334c3..0d2fc64a5e1c 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -475,7 +475,7 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) | |||
475 | goto failed_free_mem; | 475 | goto failed_free_mem; |
476 | } | 476 | } |
477 | 477 | ||
478 | keypad->clk = clk_get(&pdev->dev, "KBDCLK"); | 478 | keypad->clk = clk_get(&pdev->dev, NULL); |
479 | if (IS_ERR(keypad->clk)) { | 479 | if (IS_ERR(keypad->clk)) { |
480 | dev_err(&pdev->dev, "failed to get keypad clock\n"); | 480 | dev_err(&pdev->dev, "failed to get keypad clock\n"); |
481 | error = PTR_ERR(keypad->clk); | 481 | error = PTR_ERR(keypad->clk); |
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index c600ab7f93e8..5c8a1bcf7ca7 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
21 | #include <linux/clk.h> | ||
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
22 | #include <asm/sh_keysc.h> | 23 | #include <asm/sh_keysc.h> |
23 | 24 | ||
@@ -39,6 +40,7 @@ static const struct { | |||
39 | 40 | ||
40 | struct sh_keysc_priv { | 41 | struct sh_keysc_priv { |
41 | void __iomem *iomem_base; | 42 | void __iomem *iomem_base; |
43 | struct clk *clk; | ||
42 | unsigned long last_keys; | 44 | unsigned long last_keys; |
43 | struct input_dev *input; | 45 | struct input_dev *input; |
44 | struct sh_keysc_info pdata; | 46 | struct sh_keysc_info pdata; |
@@ -125,6 +127,7 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev) | |||
125 | struct sh_keysc_info *pdata; | 127 | struct sh_keysc_info *pdata; |
126 | struct resource *res; | 128 | struct resource *res; |
127 | struct input_dev *input; | 129 | struct input_dev *input; |
130 | char clk_name[8]; | ||
128 | int i, k; | 131 | int i, k; |
129 | int irq, error; | 132 | int irq, error; |
130 | 133 | ||
@@ -165,11 +168,19 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev) | |||
165 | goto err1; | 168 | goto err1; |
166 | } | 169 | } |
167 | 170 | ||
171 | snprintf(clk_name, sizeof(clk_name), "keysc%d", pdev->id); | ||
172 | priv->clk = clk_get(&pdev->dev, clk_name); | ||
173 | if (IS_ERR(priv->clk)) { | ||
174 | dev_err(&pdev->dev, "cannot get clock \"%s\"\n", clk_name); | ||
175 | error = PTR_ERR(priv->clk); | ||
176 | goto err2; | ||
177 | } | ||
178 | |||
168 | priv->input = input_allocate_device(); | 179 | priv->input = input_allocate_device(); |
169 | if (!priv->input) { | 180 | if (!priv->input) { |
170 | dev_err(&pdev->dev, "failed to allocate input device\n"); | 181 | dev_err(&pdev->dev, "failed to allocate input device\n"); |
171 | error = -ENOMEM; | 182 | error = -ENOMEM; |
172 | goto err2; | 183 | goto err3; |
173 | } | 184 | } |
174 | 185 | ||
175 | input = priv->input; | 186 | input = priv->input; |
@@ -187,7 +198,7 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev) | |||
187 | error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev); | 198 | error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev); |
188 | if (error) { | 199 | if (error) { |
189 | dev_err(&pdev->dev, "failed to request IRQ\n"); | 200 | dev_err(&pdev->dev, "failed to request IRQ\n"); |
190 | goto err3; | 201 | goto err4; |
191 | } | 202 | } |
192 | 203 | ||
193 | for (i = 0; i < SH_KEYSC_MAXKEYS; i++) { | 204 | for (i = 0; i < SH_KEYSC_MAXKEYS; i++) { |
@@ -199,18 +210,22 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev) | |||
199 | error = input_register_device(input); | 210 | error = input_register_device(input); |
200 | if (error) { | 211 | if (error) { |
201 | dev_err(&pdev->dev, "failed to register input device\n"); | 212 | dev_err(&pdev->dev, "failed to register input device\n"); |
202 | goto err4; | 213 | goto err5; |
203 | } | 214 | } |
204 | 215 | ||
216 | clk_enable(priv->clk); | ||
217 | |||
205 | iowrite16((sh_keysc_mode[pdata->mode].kymd << 8) | | 218 | iowrite16((sh_keysc_mode[pdata->mode].kymd << 8) | |
206 | pdata->scan_timing, priv->iomem_base + KYCR1_OFFS); | 219 | pdata->scan_timing, priv->iomem_base + KYCR1_OFFS); |
207 | iowrite16(0, priv->iomem_base + KYOUTDR_OFFS); | 220 | iowrite16(0, priv->iomem_base + KYOUTDR_OFFS); |
208 | iowrite16(KYCR2_IRQ_LEVEL, priv->iomem_base + KYCR2_OFFS); | 221 | iowrite16(KYCR2_IRQ_LEVEL, priv->iomem_base + KYCR2_OFFS); |
209 | return 0; | 222 | return 0; |
210 | err4: | 223 | err5: |
211 | free_irq(irq, pdev); | 224 | free_irq(irq, pdev); |
212 | err3: | 225 | err4: |
213 | input_free_device(input); | 226 | input_free_device(input); |
227 | err3: | ||
228 | clk_put(priv->clk); | ||
214 | err2: | 229 | err2: |
215 | iounmap(priv->iomem_base); | 230 | iounmap(priv->iomem_base); |
216 | err1: | 231 | err1: |
@@ -230,6 +245,9 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev) | |||
230 | free_irq(platform_get_irq(pdev, 0), pdev); | 245 | free_irq(platform_get_irq(pdev, 0), pdev); |
231 | iounmap(priv->iomem_base); | 246 | iounmap(priv->iomem_base); |
232 | 247 | ||
248 | clk_disable(priv->clk); | ||
249 | clk_put(priv->clk); | ||
250 | |||
233 | platform_set_drvdata(pdev, NULL); | 251 | platform_set_drvdata(pdev, NULL); |
234 | kfree(priv); | 252 | kfree(priv); |
235 | return 0; | 253 | return 0; |
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 199055db5082..67e5553f699a 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -220,4 +220,11 @@ config HP_SDC_RTC | |||
220 | Say Y here if you want to support the built-in real time clock | 220 | Say Y here if you want to support the built-in real time clock |
221 | of the HP SDC controller. | 221 | of the HP SDC controller. |
222 | 222 | ||
223 | config INPUT_PCF50633_PMU | ||
224 | tristate "PCF50633 PMU events" | ||
225 | depends on MFD_PCF50633 | ||
226 | help | ||
227 | Say Y to include support for delivering PMU events via input | ||
228 | layer on NXP PCF50633. | ||
229 | |||
223 | endif | 230 | endif |
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index d7db2aeb8a98..bb62e6efacf3 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile | |||
@@ -21,3 +21,4 @@ obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o | |||
21 | obj-$(CONFIG_INPUT_UINPUT) += uinput.o | 21 | obj-$(CONFIG_INPUT_UINPUT) += uinput.o |
22 | obj-$(CONFIG_INPUT_APANEL) += apanel.o | 22 | obj-$(CONFIG_INPUT_APANEL) += apanel.o |
23 | obj-$(CONFIG_INPUT_SGI_BTNS) += sgi_btns.o | 23 | obj-$(CONFIG_INPUT_SGI_BTNS) += sgi_btns.o |
24 | obj-$(CONFIG_INPUT_PCF50633_PMU) += pcf50633-input.o | ||
diff --git a/drivers/input/misc/apanel.c b/drivers/input/misc/apanel.c index d82f7f727f7a..71b82434264d 100644 --- a/drivers/input/misc/apanel.c +++ b/drivers/input/misc/apanel.c | |||
@@ -57,7 +57,7 @@ static enum apanel_chip device_chip[APANEL_DEV_MAX]; | |||
57 | 57 | ||
58 | struct apanel { | 58 | struct apanel { |
59 | struct input_polled_dev *ipdev; | 59 | struct input_polled_dev *ipdev; |
60 | struct i2c_client client; | 60 | struct i2c_client *client; |
61 | unsigned short keymap[MAX_PANEL_KEYS]; | 61 | unsigned short keymap[MAX_PANEL_KEYS]; |
62 | u16 nkeys; | 62 | u16 nkeys; |
63 | u16 led_bits; | 63 | u16 led_bits; |
@@ -66,16 +66,7 @@ struct apanel { | |||
66 | }; | 66 | }; |
67 | 67 | ||
68 | 68 | ||
69 | static int apanel_probe(struct i2c_adapter *, int, int); | 69 | static int apanel_probe(struct i2c_client *, const struct i2c_device_id *); |
70 | |||
71 | /* for now, we only support one address */ | ||
72 | static unsigned short normal_i2c[] = {0, I2C_CLIENT_END}; | ||
73 | static unsigned short ignore = I2C_CLIENT_END; | ||
74 | static struct i2c_client_address_data addr_data = { | ||
75 | .normal_i2c = normal_i2c, | ||
76 | .probe = &ignore, | ||
77 | .ignore = &ignore, | ||
78 | }; | ||
79 | 70 | ||
80 | static void report_key(struct input_dev *input, unsigned keycode) | 71 | static void report_key(struct input_dev *input, unsigned keycode) |
81 | { | 72 | { |
@@ -103,12 +94,12 @@ static void apanel_poll(struct input_polled_dev *ipdev) | |||
103 | s32 data; | 94 | s32 data; |
104 | int i; | 95 | int i; |
105 | 96 | ||
106 | data = i2c_smbus_read_word_data(&ap->client, cmd); | 97 | data = i2c_smbus_read_word_data(ap->client, cmd); |
107 | if (data < 0) | 98 | if (data < 0) |
108 | return; /* ignore errors (due to ACPI??) */ | 99 | return; /* ignore errors (due to ACPI??) */ |
109 | 100 | ||
110 | /* write back to clear latch */ | 101 | /* write back to clear latch */ |
111 | i2c_smbus_write_word_data(&ap->client, cmd, 0); | 102 | i2c_smbus_write_word_data(ap->client, cmd, 0); |
112 | 103 | ||
113 | if (!data) | 104 | if (!data) |
114 | return; | 105 | return; |
@@ -124,7 +115,7 @@ static void led_update(struct work_struct *work) | |||
124 | { | 115 | { |
125 | struct apanel *ap = container_of(work, struct apanel, led_work); | 116 | struct apanel *ap = container_of(work, struct apanel, led_work); |
126 | 117 | ||
127 | i2c_smbus_write_word_data(&ap->client, 0x10, ap->led_bits); | 118 | i2c_smbus_write_word_data(ap->client, 0x10, ap->led_bits); |
128 | } | 119 | } |
129 | 120 | ||
130 | static void mail_led_set(struct led_classdev *led, | 121 | static void mail_led_set(struct led_classdev *led, |
@@ -140,7 +131,7 @@ static void mail_led_set(struct led_classdev *led, | |||
140 | schedule_work(&ap->led_work); | 131 | schedule_work(&ap->led_work); |
141 | } | 132 | } |
142 | 133 | ||
143 | static int apanel_detach_client(struct i2c_client *client) | 134 | static int apanel_remove(struct i2c_client *client) |
144 | { | 135 | { |
145 | struct apanel *ap = i2c_get_clientdata(client); | 136 | struct apanel *ap = i2c_get_clientdata(client); |
146 | 137 | ||
@@ -148,43 +139,33 @@ static int apanel_detach_client(struct i2c_client *client) | |||
148 | led_classdev_unregister(&ap->mail_led); | 139 | led_classdev_unregister(&ap->mail_led); |
149 | 140 | ||
150 | input_unregister_polled_device(ap->ipdev); | 141 | input_unregister_polled_device(ap->ipdev); |
151 | i2c_detach_client(&ap->client); | ||
152 | input_free_polled_device(ap->ipdev); | 142 | input_free_polled_device(ap->ipdev); |
153 | 143 | ||
154 | return 0; | 144 | return 0; |
155 | } | 145 | } |
156 | 146 | ||
157 | /* Function is invoked for every i2c adapter. */ | ||
158 | static int apanel_attach_adapter(struct i2c_adapter *adap) | ||
159 | { | ||
160 | dev_dbg(&adap->dev, APANEL ": attach adapter id=%d\n", adap->id); | ||
161 | |||
162 | /* Our device is connected only to i801 on laptop */ | ||
163 | if (adap->id != I2C_HW_SMBUS_I801) | ||
164 | return -ENODEV; | ||
165 | |||
166 | return i2c_probe(adap, &addr_data, apanel_probe); | ||
167 | } | ||
168 | |||
169 | static void apanel_shutdown(struct i2c_client *client) | 147 | static void apanel_shutdown(struct i2c_client *client) |
170 | { | 148 | { |
171 | apanel_detach_client(client); | 149 | apanel_remove(client); |
172 | } | 150 | } |
173 | 151 | ||
152 | static struct i2c_device_id apanel_id[] = { | ||
153 | { "fujitsu_apanel", 0 }, | ||
154 | { } | ||
155 | }; | ||
156 | MODULE_DEVICE_TABLE(i2c, apanel_id); | ||
157 | |||
174 | static struct i2c_driver apanel_driver = { | 158 | static struct i2c_driver apanel_driver = { |
175 | .driver = { | 159 | .driver = { |
176 | .name = APANEL, | 160 | .name = APANEL, |
177 | }, | 161 | }, |
178 | .attach_adapter = &apanel_attach_adapter, | 162 | .probe = &apanel_probe, |
179 | .detach_client = &apanel_detach_client, | 163 | .remove = &apanel_remove, |
180 | .shutdown = &apanel_shutdown, | 164 | .shutdown = &apanel_shutdown, |
165 | .id_table = apanel_id, | ||
181 | }; | 166 | }; |
182 | 167 | ||
183 | static struct apanel apanel = { | 168 | static struct apanel apanel = { |
184 | .client = { | ||
185 | .driver = &apanel_driver, | ||
186 | .name = APANEL, | ||
187 | }, | ||
188 | .keymap = { | 169 | .keymap = { |
189 | [0] = KEY_MAIL, | 170 | [0] = KEY_MAIL, |
190 | [1] = KEY_WWW, | 171 | [1] = KEY_WWW, |
@@ -204,7 +185,8 @@ static struct apanel apanel = { | |||
204 | }; | 185 | }; |
205 | 186 | ||
206 | /* NB: Only one panel on the i2c. */ | 187 | /* NB: Only one panel on the i2c. */ |
207 | static int apanel_probe(struct i2c_adapter *bus, int address, int kind) | 188 | static int apanel_probe(struct i2c_client *client, |
189 | const struct i2c_device_id *id) | ||
208 | { | 190 | { |
209 | struct apanel *ap; | 191 | struct apanel *ap; |
210 | struct input_polled_dev *ipdev; | 192 | struct input_polled_dev *ipdev; |
@@ -212,9 +194,6 @@ static int apanel_probe(struct i2c_adapter *bus, int address, int kind) | |||
212 | u8 cmd = device_chip[APANEL_DEV_APPBTN] == CHIP_OZ992C ? 0 : 8; | 194 | u8 cmd = device_chip[APANEL_DEV_APPBTN] == CHIP_OZ992C ? 0 : 8; |
213 | int i, err = -ENOMEM; | 195 | int i, err = -ENOMEM; |
214 | 196 | ||
215 | dev_dbg(&bus->dev, APANEL ": probe adapter %p addr %d kind %d\n", | ||
216 | bus, address, kind); | ||
217 | |||
218 | ap = &apanel; | 197 | ap = &apanel; |
219 | 198 | ||
220 | ipdev = input_allocate_polled_device(); | 199 | ipdev = input_allocate_polled_device(); |
@@ -222,18 +201,13 @@ static int apanel_probe(struct i2c_adapter *bus, int address, int kind) | |||
222 | goto out1; | 201 | goto out1; |
223 | 202 | ||
224 | ap->ipdev = ipdev; | 203 | ap->ipdev = ipdev; |
225 | ap->client.adapter = bus; | 204 | ap->client = client; |
226 | ap->client.addr = address; | ||
227 | |||
228 | i2c_set_clientdata(&ap->client, ap); | ||
229 | 205 | ||
230 | err = i2c_attach_client(&ap->client); | 206 | i2c_set_clientdata(client, ap); |
231 | if (err) | ||
232 | goto out2; | ||
233 | 207 | ||
234 | err = i2c_smbus_write_word_data(&ap->client, cmd, 0); | 208 | err = i2c_smbus_write_word_data(client, cmd, 0); |
235 | if (err) { | 209 | if (err) { |
236 | dev_warn(&ap->client.dev, APANEL ": smbus write error %d\n", | 210 | dev_warn(&client->dev, APANEL ": smbus write error %d\n", |
237 | err); | 211 | err); |
238 | goto out3; | 212 | goto out3; |
239 | } | 213 | } |
@@ -246,7 +220,7 @@ static int apanel_probe(struct i2c_adapter *bus, int address, int kind) | |||
246 | idev->name = APANEL_NAME " buttons"; | 220 | idev->name = APANEL_NAME " buttons"; |
247 | idev->phys = "apanel/input0"; | 221 | idev->phys = "apanel/input0"; |
248 | idev->id.bustype = BUS_HOST; | 222 | idev->id.bustype = BUS_HOST; |
249 | idev->dev.parent = &ap->client.dev; | 223 | idev->dev.parent = &client->dev; |
250 | 224 | ||
251 | set_bit(EV_KEY, idev->evbit); | 225 | set_bit(EV_KEY, idev->evbit); |
252 | 226 | ||
@@ -264,7 +238,7 @@ static int apanel_probe(struct i2c_adapter *bus, int address, int kind) | |||
264 | 238 | ||
265 | INIT_WORK(&ap->led_work, led_update); | 239 | INIT_WORK(&ap->led_work, led_update); |
266 | if (device_chip[APANEL_DEV_LED] != CHIP_NONE) { | 240 | if (device_chip[APANEL_DEV_LED] != CHIP_NONE) { |
267 | err = led_classdev_register(&ap->client.dev, &ap->mail_led); | 241 | err = led_classdev_register(&client->dev, &ap->mail_led); |
268 | if (err) | 242 | if (err) |
269 | goto out4; | 243 | goto out4; |
270 | } | 244 | } |
@@ -273,8 +247,6 @@ static int apanel_probe(struct i2c_adapter *bus, int address, int kind) | |||
273 | out4: | 247 | out4: |
274 | input_unregister_polled_device(ipdev); | 248 | input_unregister_polled_device(ipdev); |
275 | out3: | 249 | out3: |
276 | i2c_detach_client(&ap->client); | ||
277 | out2: | ||
278 | input_free_polled_device(ipdev); | 250 | input_free_polled_device(ipdev); |
279 | out1: | 251 | out1: |
280 | return err; | 252 | return err; |
@@ -301,6 +273,7 @@ static int __init apanel_init(void) | |||
301 | void __iomem *bios; | 273 | void __iomem *bios; |
302 | const void __iomem *p; | 274 | const void __iomem *p; |
303 | u8 devno; | 275 | u8 devno; |
276 | unsigned char i2c_addr; | ||
304 | int found = 0; | 277 | int found = 0; |
305 | 278 | ||
306 | bios = ioremap(0xF0000, 0x10000); /* Can't fail */ | 279 | bios = ioremap(0xF0000, 0x10000); /* Can't fail */ |
@@ -313,7 +286,7 @@ static int __init apanel_init(void) | |||
313 | 286 | ||
314 | /* just use the first address */ | 287 | /* just use the first address */ |
315 | p += 8; | 288 | p += 8; |
316 | normal_i2c[0] = readb(p+3) >> 1; | 289 | i2c_addr = readb(p + 3) >> 1; |
317 | 290 | ||
318 | for ( ; (devno = readb(p)) & 0x7f; p += 4) { | 291 | for ( ; (devno = readb(p)) & 0x7f; p += 4) { |
319 | unsigned char method, slave, chip; | 292 | unsigned char method, slave, chip; |
@@ -322,7 +295,7 @@ static int __init apanel_init(void) | |||
322 | chip = readb(p + 2); | 295 | chip = readb(p + 2); |
323 | slave = readb(p + 3) >> 1; | 296 | slave = readb(p + 3) >> 1; |
324 | 297 | ||
325 | if (slave != normal_i2c[0]) { | 298 | if (slave != i2c_addr) { |
326 | pr_notice(APANEL ": only one SMBus slave " | 299 | pr_notice(APANEL ": only one SMBus slave " |
327 | "address supported, skiping device...\n"); | 300 | "address supported, skiping device...\n"); |
328 | continue; | 301 | continue; |
diff --git a/drivers/input/misc/pcf50633-input.c b/drivers/input/misc/pcf50633-input.c new file mode 100644 index 000000000000..039dcb00ebd9 --- /dev/null +++ b/drivers/input/misc/pcf50633-input.c | |||
@@ -0,0 +1,132 @@ | |||
1 | /* NXP PCF50633 Input Driver | ||
2 | * | ||
3 | * (C) 2006-2008 by Openmoko, Inc. | ||
4 | * Author: Balaji Rao <balajirrao@openmoko.org> | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Broken down from monstrous PCF50633 driver mainly by | ||
8 | * Harald Welte, Andy Green and Werner Almesberger | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/device.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/input.h> | ||
23 | |||
24 | #include <linux/mfd/pcf50633/core.h> | ||
25 | |||
26 | #define PCF50633_OOCSTAT_ONKEY 0x01 | ||
27 | #define PCF50633_REG_OOCSTAT 0x12 | ||
28 | #define PCF50633_REG_OOCMODE 0x10 | ||
29 | |||
30 | struct pcf50633_input { | ||
31 | struct pcf50633 *pcf; | ||
32 | struct input_dev *input_dev; | ||
33 | }; | ||
34 | |||
35 | static void | ||
36 | pcf50633_input_irq(int irq, void *data) | ||
37 | { | ||
38 | struct pcf50633_input *input; | ||
39 | int onkey_released; | ||
40 | |||
41 | input = data; | ||
42 | |||
43 | /* We report only one event depending on the key press status */ | ||
44 | onkey_released = pcf50633_reg_read(input->pcf, PCF50633_REG_OOCSTAT) | ||
45 | & PCF50633_OOCSTAT_ONKEY; | ||
46 | |||
47 | if (irq == PCF50633_IRQ_ONKEYF && !onkey_released) | ||
48 | input_report_key(input->input_dev, KEY_POWER, 1); | ||
49 | else if (irq == PCF50633_IRQ_ONKEYR && onkey_released) | ||
50 | input_report_key(input->input_dev, KEY_POWER, 0); | ||
51 | |||
52 | input_sync(input->input_dev); | ||
53 | } | ||
54 | |||
55 | static int __devinit pcf50633_input_probe(struct platform_device *pdev) | ||
56 | { | ||
57 | struct pcf50633_input *input; | ||
58 | struct pcf50633_subdev_pdata *pdata = pdev->dev.platform_data; | ||
59 | struct input_dev *input_dev; | ||
60 | int ret; | ||
61 | |||
62 | |||
63 | input = kzalloc(sizeof(*input), GFP_KERNEL); | ||
64 | if (!input) | ||
65 | return -ENOMEM; | ||
66 | |||
67 | input_dev = input_allocate_device(); | ||
68 | if (!input_dev) { | ||
69 | kfree(input); | ||
70 | return -ENOMEM; | ||
71 | } | ||
72 | |||
73 | platform_set_drvdata(pdev, input); | ||
74 | input->pcf = pdata->pcf; | ||
75 | input->input_dev = input_dev; | ||
76 | |||
77 | input_dev->name = "PCF50633 PMU events"; | ||
78 | input_dev->id.bustype = BUS_I2C; | ||
79 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_PWR); | ||
80 | set_bit(KEY_POWER, input_dev->keybit); | ||
81 | |||
82 | ret = input_register_device(input_dev); | ||
83 | if (ret) { | ||
84 | input_free_device(input_dev); | ||
85 | kfree(input); | ||
86 | return ret; | ||
87 | } | ||
88 | pcf50633_register_irq(pdata->pcf, PCF50633_IRQ_ONKEYR, | ||
89 | pcf50633_input_irq, input); | ||
90 | pcf50633_register_irq(pdata->pcf, PCF50633_IRQ_ONKEYF, | ||
91 | pcf50633_input_irq, input); | ||
92 | |||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | static int __devexit pcf50633_input_remove(struct platform_device *pdev) | ||
97 | { | ||
98 | struct pcf50633_input *input = platform_get_drvdata(pdev); | ||
99 | |||
100 | pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYR); | ||
101 | pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYF); | ||
102 | |||
103 | input_unregister_device(input->input_dev); | ||
104 | kfree(input); | ||
105 | |||
106 | return 0; | ||
107 | } | ||
108 | |||
109 | static struct platform_driver pcf50633_input_driver = { | ||
110 | .driver = { | ||
111 | .name = "pcf50633-input", | ||
112 | }, | ||
113 | .probe = pcf50633_input_probe, | ||
114 | .remove = __devexit_p(pcf50633_input_remove), | ||
115 | }; | ||
116 | |||
117 | static int __init pcf50633_input_init(void) | ||
118 | { | ||
119 | return platform_driver_register(&pcf50633_input_driver); | ||
120 | } | ||
121 | module_init(pcf50633_input_init); | ||
122 | |||
123 | static void __exit pcf50633_input_exit(void) | ||
124 | { | ||
125 | platform_driver_unregister(&pcf50633_input_driver); | ||
126 | } | ||
127 | module_exit(pcf50633_input_exit); | ||
128 | |||
129 | MODULE_AUTHOR("Balaji Rao <balajirrao@openmoko.org>"); | ||
130 | MODULE_DESCRIPTION("PCF50633 input driver"); | ||
131 | MODULE_LICENSE("GPL"); | ||
132 | MODULE_ALIAS("platform:pcf50633-input"); | ||
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c index 784be69b7112..1e827ad0afbe 100644 --- a/drivers/input/mouse/pxa930_trkball.c +++ b/drivers/input/mouse/pxa930_trkball.c | |||
@@ -186,7 +186,7 @@ static int __devinit pxa930_trkball_probe(struct platform_device *pdev) | |||
186 | error = request_irq(irq, pxa930_trkball_interrupt, IRQF_DISABLED, | 186 | error = request_irq(irq, pxa930_trkball_interrupt, IRQF_DISABLED, |
187 | pdev->name, trkball); | 187 | pdev->name, trkball); |
188 | if (error) { | 188 | if (error) { |
189 | dev_err(&pdev->dev, "failed to request irq: %d\n", ret); | 189 | dev_err(&pdev->dev, "failed to request irq: %d\n", error); |
190 | goto failed_free_io; | 190 | goto failed_free_io; |
191 | } | 191 | } |
192 | 192 | ||
@@ -227,7 +227,7 @@ failed_free_io: | |||
227 | iounmap(trkball->mmio_base); | 227 | iounmap(trkball->mmio_base); |
228 | failed: | 228 | failed: |
229 | kfree(trkball); | 229 | kfree(trkball); |
230 | return ret; | 230 | return error; |
231 | } | 231 | } |
232 | 232 | ||
233 | static int __devexit pxa930_trkball_remove(struct platform_device *pdev) | 233 | static int __devexit pxa930_trkball_remove(struct platform_device *pdev) |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 27d70d326ff3..da3c3a5d2689 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -79,7 +79,7 @@ config SERIO_PARKBD | |||
79 | 79 | ||
80 | config SERIO_RPCKBD | 80 | config SERIO_RPCKBD |
81 | tristate "Acorn RiscPC keyboard controller" | 81 | tristate "Acorn RiscPC keyboard controller" |
82 | depends on ARCH_ACORN || ARCH_CLPS7500 | 82 | depends on ARCH_ACORN |
83 | default y | 83 | default y |
84 | help | 84 | help |
85 | Say Y here if you have the Acorn RiscPC and want to use an AT | 85 | Say Y here if you have the Acorn RiscPC and want to use an AT |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index d0004dc44c86..7c27c8b9b6d0 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -697,7 +697,7 @@ static enum hrtimer_restart ads7846_timer(struct hrtimer *handle) | |||
697 | struct ads7846 *ts = container_of(handle, struct ads7846, timer); | 697 | struct ads7846 *ts = container_of(handle, struct ads7846, timer); |
698 | int status = 0; | 698 | int status = 0; |
699 | 699 | ||
700 | spin_lock_irq(&ts->lock); | 700 | spin_lock(&ts->lock); |
701 | 701 | ||
702 | if (unlikely(!get_pendown_state(ts) || | 702 | if (unlikely(!get_pendown_state(ts) || |
703 | device_suspended(&ts->spi->dev))) { | 703 | device_suspended(&ts->spi->dev))) { |
@@ -728,7 +728,7 @@ static enum hrtimer_restart ads7846_timer(struct hrtimer *handle) | |||
728 | dev_err(&ts->spi->dev, "spi_async --> %d\n", status); | 728 | dev_err(&ts->spi->dev, "spi_async --> %d\n", status); |
729 | } | 729 | } |
730 | 730 | ||
731 | spin_unlock_irq(&ts->lock); | 731 | spin_unlock(&ts->lock); |
732 | return HRTIMER_NORESTART; | 732 | return HRTIMER_NORESTART; |
733 | } | 733 | } |
734 | 734 | ||
diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index 4342e77814b5..fa67d782c3c3 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/workqueue.h> | ||
19 | #include <linux/mfd/da903x.h> | 20 | #include <linux/mfd/da903x.h> |
20 | 21 | ||
21 | #define DA9034_MANUAL_CTRL 0x50 | 22 | #define DA9034_MANUAL_CTRL 0x50 |
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c index ba648750a8d9..1d11e2be9ef8 100644 --- a/drivers/input/touchscreen/mainstone-wm97xx.c +++ b/drivers/input/touchscreen/mainstone-wm97xx.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/wm97xx.h> | 32 | #include <linux/wm97xx.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <mach/pxa-regs.h> | 34 | #include <mach/regs-ac97.h> |
35 | 35 | ||
36 | #define VERSION "0.13" | 36 | #define VERSION "0.13" |
37 | 37 | ||