diff options
Diffstat (limited to 'drivers/input')
-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/serio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 4 | ||||
-rw-r--r-- | drivers/input/touchscreen/mainstone-wm97xx.c | 2 |
6 files changed, 32 insertions, 14 deletions
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index ec0ebee46069..3f3d1198cdb1 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 __init 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 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/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/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 | ||