aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-08-08 16:21:02 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-08-08 16:21:02 -0400
commite4ddcb0a6bf04d53ce77b4eb87bbbb32c4261d11 (patch)
treed27d2fea50a384d97aa2d0cf5c8657c916f761d4 /drivers/input
parentf2afa7711f8585ffc088ba538b9a510e0d5dca12 (diff)
parent6e86841d05f371b5b9b86ce76c02aaee83352298 (diff)
Merge commit 'v2.6.27-rc1' into for-linus
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/hil_kbd.c1
-rw-r--r--drivers/input/keyboard/sh_keysc.c27
-rw-r--r--drivers/input/keyboard/tosakbd.c2
-rw-r--r--drivers/input/misc/hp_sdc_rtc.c1
-rw-r--r--drivers/input/serio/hp_sdc.c2
-rw-r--r--drivers/input/touchscreen/corgi_ts.c8
-rw-r--r--drivers/input/touchscreen/mainstone-wm97xx.c2
7 files changed, 15 insertions, 28 deletions
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index adbf29f0169d..71c1971abf80 100644
--- a/drivers/input/keyboard/hil_kbd.c
+++ b/drivers/input/keyboard/hil_kbd.c
@@ -37,6 +37,7 @@
37#include <linux/kernel.h> 37#include <linux/kernel.h>
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/init.h> 39#include <linux/init.h>
40#include <linux/semaphore.h>
40#include <linux/slab.h> 41#include <linux/slab.h>
41#include <linux/pci_ids.h> 42#include <linux/pci_ids.h>
42 43
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c
index 8486abc457ed..c600ab7f93e8 100644
--- a/drivers/input/keyboard/sh_keysc.c
+++ b/drivers/input/keyboard/sh_keysc.c
@@ -158,25 +158,18 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
158 memcpy(&priv->pdata, pdev->dev.platform_data, sizeof(priv->pdata)); 158 memcpy(&priv->pdata, pdev->dev.platform_data, sizeof(priv->pdata));
159 pdata = &priv->pdata; 159 pdata = &priv->pdata;
160 160
161 res = request_mem_region(res->start, res_size(res), pdev->name);
162 if (res == NULL) {
163 dev_err(&pdev->dev, "failed to request I/O memory\n");
164 error = -EBUSY;
165 goto err1;
166 }
167
168 priv->iomem_base = ioremap_nocache(res->start, res_size(res)); 161 priv->iomem_base = ioremap_nocache(res->start, res_size(res));
169 if (priv->iomem_base == NULL) { 162 if (priv->iomem_base == NULL) {
170 dev_err(&pdev->dev, "failed to remap I/O memory\n"); 163 dev_err(&pdev->dev, "failed to remap I/O memory\n");
171 error = -ENXIO; 164 error = -ENXIO;
172 goto err2; 165 goto err1;
173 } 166 }
174 167
175 priv->input = input_allocate_device(); 168 priv->input = input_allocate_device();
176 if (!priv->input) { 169 if (!priv->input) {
177 dev_err(&pdev->dev, "failed to allocate input device\n"); 170 dev_err(&pdev->dev, "failed to allocate input device\n");
178 error = -ENOMEM; 171 error = -ENOMEM;
179 goto err3; 172 goto err2;
180 } 173 }
181 174
182 input = priv->input; 175 input = priv->input;
@@ -194,7 +187,7 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
194 error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev); 187 error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev);
195 if (error) { 188 if (error) {
196 dev_err(&pdev->dev, "failed to request IRQ\n"); 189 dev_err(&pdev->dev, "failed to request IRQ\n");
197 goto err4; 190 goto err3;
198 } 191 }
199 192
200 for (i = 0; i < SH_KEYSC_MAXKEYS; i++) { 193 for (i = 0; i < SH_KEYSC_MAXKEYS; i++) {
@@ -206,7 +199,7 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
206 error = input_register_device(input); 199 error = input_register_device(input);
207 if (error) { 200 if (error) {
208 dev_err(&pdev->dev, "failed to register input device\n"); 201 dev_err(&pdev->dev, "failed to register input device\n");
209 goto err5; 202 goto err4;
210 } 203 }
211 204
212 iowrite16((sh_keysc_mode[pdata->mode].kymd << 8) | 205 iowrite16((sh_keysc_mode[pdata->mode].kymd << 8) |
@@ -214,14 +207,12 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
214 iowrite16(0, priv->iomem_base + KYOUTDR_OFFS); 207 iowrite16(0, priv->iomem_base + KYOUTDR_OFFS);
215 iowrite16(KYCR2_IRQ_LEVEL, priv->iomem_base + KYCR2_OFFS); 208 iowrite16(KYCR2_IRQ_LEVEL, priv->iomem_base + KYCR2_OFFS);
216 return 0; 209 return 0;
217 err5:
218 free_irq(irq, pdev);
219 err4: 210 err4:
220 input_free_device(input); 211 free_irq(irq, pdev);
221 err3: 212 err3:
222 iounmap(priv->iomem_base); 213 input_free_device(input);
223 err2: 214 err2:
224 release_mem_region(res->start, res_size(res)); 215 iounmap(priv->iomem_base);
225 err1: 216 err1:
226 platform_set_drvdata(pdev, NULL); 217 platform_set_drvdata(pdev, NULL);
227 kfree(priv); 218 kfree(priv);
@@ -232,7 +223,6 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
232static int __devexit sh_keysc_remove(struct platform_device *pdev) 223static int __devexit sh_keysc_remove(struct platform_device *pdev)
233{ 224{
234 struct sh_keysc_priv *priv = platform_get_drvdata(pdev); 225 struct sh_keysc_priv *priv = platform_get_drvdata(pdev);
235 struct resource *res;
236 226
237 iowrite16(KYCR2_IRQ_DISABLED, priv->iomem_base + KYCR2_OFFS); 227 iowrite16(KYCR2_IRQ_DISABLED, priv->iomem_base + KYCR2_OFFS);
238 228
@@ -240,9 +230,6 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev)
240 free_irq(platform_get_irq(pdev, 0), pdev); 230 free_irq(platform_get_irq(pdev, 0), pdev);
241 iounmap(priv->iomem_base); 231 iounmap(priv->iomem_base);
242 232
243 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
244 release_mem_region(res->start, res_size(res));
245
246 platform_set_drvdata(pdev, NULL); 233 platform_set_drvdata(pdev, NULL);
247 kfree(priv); 234 kfree(priv);
248 return 0; 235 return 0;
diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c
index 94e444b4ee15..b12b7ee4b6aa 100644
--- a/drivers/input/keyboard/tosakbd.c
+++ b/drivers/input/keyboard/tosakbd.c
@@ -215,8 +215,6 @@ static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)
215 unsigned long flags; 215 unsigned long flags;
216 216
217 spin_lock_irqsave(&tosakbd->lock, flags); 217 spin_lock_irqsave(&tosakbd->lock, flags);
218 PGSR1 = (PGSR1 & ~TOSA_GPIO_LOW_STROBE_BIT);
219 PGSR2 = (PGSR2 & ~TOSA_GPIO_HIGH_STROBE_BIT);
220 tosakbd->suspended = 1; 218 tosakbd->suspended = 1;
221 spin_unlock_irqrestore(&tosakbd->lock, flags); 219 spin_unlock_irqrestore(&tosakbd->lock, flags);
222 220
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index 49d8abfe38fe..daa9d4220331 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -44,6 +44,7 @@
44#include <linux/proc_fs.h> 44#include <linux/proc_fs.h>
45#include <linux/poll.h> 45#include <linux/poll.h>
46#include <linux/rtc.h> 46#include <linux/rtc.h>
47#include <linux/semaphore.h>
47 48
48MODULE_AUTHOR("Brian S. Julin <bri@calyx.com>"); 49MODULE_AUTHOR("Brian S. Julin <bri@calyx.com>");
49MODULE_DESCRIPTION("HP i8042 SDC + MSM-58321 RTC Driver"); 50MODULE_DESCRIPTION("HP i8042 SDC + MSM-58321 RTC Driver");
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c
index 7b233a492ad5..0d395979b2d1 100644
--- a/drivers/input/serio/hp_sdc.c
+++ b/drivers/input/serio/hp_sdc.c
@@ -67,9 +67,9 @@
67#include <linux/module.h> 67#include <linux/module.h>
68#include <linux/ioport.h> 68#include <linux/ioport.h>
69#include <linux/time.h> 69#include <linux/time.h>
70#include <linux/semaphore.h>
70#include <linux/slab.h> 71#include <linux/slab.h>
71#include <linux/hil.h> 72#include <linux/hil.h>
72#include <linux/semaphore.h>
73#include <asm/io.h> 73#include <asm/io.h>
74#include <asm/system.h> 74#include <asm/system.h>
75 75
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c
index 4e9d8eece2e0..d0e13fc4a88c 100644
--- a/drivers/input/touchscreen/corgi_ts.c
+++ b/drivers/input/touchscreen/corgi_ts.c
@@ -195,7 +195,7 @@ static void ts_interrupt_main(struct corgi_ts *corgi_ts, int isTimer)
195{ 195{
196 if ((GPLR(IRQ_TO_GPIO(corgi_ts->irq_gpio)) & GPIO_bit(IRQ_TO_GPIO(corgi_ts->irq_gpio))) == 0) { 196 if ((GPLR(IRQ_TO_GPIO(corgi_ts->irq_gpio)) & GPIO_bit(IRQ_TO_GPIO(corgi_ts->irq_gpio))) == 0) {
197 /* Disable Interrupt */ 197 /* Disable Interrupt */
198 set_irq_type(corgi_ts->irq_gpio, IRQT_NOEDGE); 198 set_irq_type(corgi_ts->irq_gpio, IRQ_TYPE_NONE);
199 if (read_xydata(corgi_ts)) { 199 if (read_xydata(corgi_ts)) {
200 corgi_ts->pendown = 1; 200 corgi_ts->pendown = 1;
201 new_data(corgi_ts); 201 new_data(corgi_ts);
@@ -214,7 +214,7 @@ static void ts_interrupt_main(struct corgi_ts *corgi_ts, int isTimer)
214 } 214 }
215 215
216 /* Enable Falling Edge */ 216 /* Enable Falling Edge */
217 set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING); 217 set_irq_type(corgi_ts->irq_gpio, IRQ_TYPE_EDGE_FALLING);
218 corgi_ts->pendown = 0; 218 corgi_ts->pendown = 0;
219 } 219 }
220} 220}
@@ -258,7 +258,7 @@ static int corgits_resume(struct platform_device *dev)
258 258
259 corgi_ssp_ads7846_putget((4u << ADSCTRL_ADR_SH) | ADSCTRL_STS); 259 corgi_ssp_ads7846_putget((4u << ADSCTRL_ADR_SH) | ADSCTRL_STS);
260 /* Enable Falling Edge */ 260 /* Enable Falling Edge */
261 set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING); 261 set_irq_type(corgi_ts->irq_gpio, IRQ_TYPE_EDGE_FALLING);
262 corgi_ts->power_mode = PWR_MODE_ACTIVE; 262 corgi_ts->power_mode = PWR_MODE_ACTIVE;
263 263
264 return 0; 264 return 0;
@@ -333,7 +333,7 @@ static int __init corgits_probe(struct platform_device *pdev)
333 corgi_ts->power_mode = PWR_MODE_ACTIVE; 333 corgi_ts->power_mode = PWR_MODE_ACTIVE;
334 334
335 /* Enable Falling Edge */ 335 /* Enable Falling Edge */
336 set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING); 336 set_irq_type(corgi_ts->irq_gpio, IRQ_TYPE_EDGE_FALLING);
337 337
338 return 0; 338 return 0;
339 339
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c
index a79f029b91c0..590a1379aa32 100644
--- a/drivers/input/touchscreen/mainstone-wm97xx.c
+++ b/drivers/input/touchscreen/mainstone-wm97xx.c
@@ -198,7 +198,7 @@ static int wm97xx_acc_startup(struct wm97xx *wm)
198 switch (wm->id) { 198 switch (wm->id) {
199 case WM9705_ID2: 199 case WM9705_ID2:
200 wm->pen_irq = IRQ_GPIO(4); 200 wm->pen_irq = IRQ_GPIO(4);
201 set_irq_type(IRQ_GPIO(4), IRQT_BOTHEDGE); 201 set_irq_type(IRQ_GPIO(4), IRQ_TYPE_EDGE_BOTH);
202 break; 202 break;
203 case WM9712_ID2: 203 case WM9712_ID2:
204 case WM9713_ID2: 204 case WM9713_ID2: