aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/evdev.c8
-rw-r--r--drivers/input/joystick/amijoy.c4
-rw-r--r--drivers/input/keyboard/corgikbd.c6
-rw-r--r--drivers/input/keyboard/spitzkbd.c27
-rw-r--r--drivers/input/misc/hp_sdc_rtc.c9
-rw-r--r--drivers/input/mouse/amimouse.c6
-rw-r--r--drivers/input/serio/ambakmi.c15
-rw-r--r--drivers/input/serio/sa1111ps2.c1
-rw-r--r--drivers/input/serio/serport.c13
9 files changed, 32 insertions, 57 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 0270d1ec9425..745979f33dc2 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -154,11 +154,13 @@ struct input_event_compat {
154 __s32 value; 154 __s32 value;
155}; 155};
156 156
157/* Note to the author of this code: did it ever occur to
158 you why the ifdefs are needed? Think about it again. -AK */
157#ifdef CONFIG_X86_64 159#ifdef CONFIG_X86_64
158# define COMPAT_TEST test_thread_flag(TIF_IA32) 160# define COMPAT_TEST is_compat_task()
159#elif defined(CONFIG_IA64) 161#elif defined(CONFIG_IA64)
160# define COMPAT_TEST IS_IA32_PROCESS(ia64_task_regs(current)) 162# define COMPAT_TEST IS_IA32_PROCESS(task_pt_regs(current))
161#elif defined(CONFIG_ARCH_S390) 163#elif defined(CONFIG_S390)
162# define COMPAT_TEST test_thread_flag(TIF_31BIT) 164# define COMPAT_TEST test_thread_flag(TIF_31BIT)
163#elif defined(CONFIG_MIPS) 165#elif defined(CONFIG_MIPS)
164# define COMPAT_TEST (current->thread.mflags & MF_32BIT_ADDR) 166# define COMPAT_TEST (current->thread.mflags & MF_32BIT_ADDR)
diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c
index 8558a99f6635..ec55a29fc861 100644
--- a/drivers/input/joystick/amijoy.c
+++ b/drivers/input/joystick/amijoy.c
@@ -64,8 +64,8 @@ static irqreturn_t amijoy_interrupt(int irq, void *dummy, struct pt_regs *fp)
64 if (amijoy[i]) { 64 if (amijoy[i]) {
65 65
66 switch (i) { 66 switch (i) {
67 case 0: data = ~custom.joy0dat; button = (~ciaa.pra >> 6) & 1; break; 67 case 0: data = ~amiga_custom.joy0dat; button = (~ciaa.pra >> 6) & 1; break;
68 case 1: data = ~custom.joy1dat; button = (~ciaa.pra >> 7) & 1; break; 68 case 1: data = ~amiga_custom.joy1dat; button = (~ciaa.pra >> 7) & 1; break;
69 } 69 }
70 70
71 input_regs(amijoy_dev[i], fp); 71 input_regs(amijoy_dev[i], fp);
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c
index 64672d491222..e301ee4ca264 100644
--- a/drivers/input/keyboard/corgikbd.c
+++ b/drivers/input/keyboard/corgikbd.c
@@ -19,7 +19,6 @@
19#include <linux/jiffies.h> 19#include <linux/jiffies.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <asm/irq.h>
23 22
24#include <asm/arch/corgi.h> 23#include <asm/arch/corgi.h>
25#include <asm/arch/hardware.h> 24#include <asm/arch/hardware.h>
@@ -343,10 +342,9 @@ static int __init corgikbd_probe(struct platform_device *pdev)
343 for (i = 0; i < CORGI_KEY_SENSE_NUM; i++) { 342 for (i = 0; i < CORGI_KEY_SENSE_NUM; i++) {
344 pxa_gpio_mode(CORGI_GPIO_KEY_SENSE(i) | GPIO_IN); 343 pxa_gpio_mode(CORGI_GPIO_KEY_SENSE(i) | GPIO_IN);
345 if (request_irq(CORGI_IRQ_GPIO_KEY_SENSE(i), corgikbd_interrupt, 344 if (request_irq(CORGI_IRQ_GPIO_KEY_SENSE(i), corgikbd_interrupt,
346 SA_INTERRUPT, "corgikbd", corgikbd)) 345 SA_INTERRUPT | SA_TRIGGER_RISING,
346 "corgikbd", corgikbd))
347 printk(KERN_WARNING "corgikbd: Can't get IRQ: %d!\n", i); 347 printk(KERN_WARNING "corgikbd: Can't get IRQ: %d!\n", i);
348 else
349 set_irq_type(CORGI_IRQ_GPIO_KEY_SENSE(i),IRQT_RISING);
350 } 348 }
351 349
352 /* Set Strobe lines as outputs - set high */ 350 /* Set Strobe lines as outputs - set high */
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index 6a15fe3bc527..83999d583122 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -19,7 +19,6 @@
19#include <linux/jiffies.h> 19#include <linux/jiffies.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <asm/irq.h>
23 22
24#include <asm/arch/spitz.h> 23#include <asm/arch/spitz.h>
25#include <asm/arch/hardware.h> 24#include <asm/arch/hardware.h>
@@ -407,10 +406,9 @@ static int __init spitzkbd_probe(struct platform_device *dev)
407 for (i = 0; i < SPITZ_KEY_SENSE_NUM; i++) { 406 for (i = 0; i < SPITZ_KEY_SENSE_NUM; i++) {
408 pxa_gpio_mode(spitz_senses[i] | GPIO_IN); 407 pxa_gpio_mode(spitz_senses[i] | GPIO_IN);
409 if (request_irq(IRQ_GPIO(spitz_senses[i]), spitzkbd_interrupt, 408 if (request_irq(IRQ_GPIO(spitz_senses[i]), spitzkbd_interrupt,
410 SA_INTERRUPT, "Spitzkbd Sense", spitzkbd)) 409 SA_INTERRUPT|SA_TRIGGER_RISING,
410 "Spitzkbd Sense", spitzkbd))
411 printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i); 411 printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i);
412 else
413 set_irq_type(IRQ_GPIO(spitz_senses[i]),IRQT_RISING);
414 } 412 }
415 413
416 /* Set Strobe lines as outputs - set high */ 414 /* Set Strobe lines as outputs - set high */
@@ -422,15 +420,18 @@ static int __init spitzkbd_probe(struct platform_device *dev)
422 pxa_gpio_mode(SPITZ_GPIO_SWA | GPIO_IN); 420 pxa_gpio_mode(SPITZ_GPIO_SWA | GPIO_IN);
423 pxa_gpio_mode(SPITZ_GPIO_SWB | GPIO_IN); 421 pxa_gpio_mode(SPITZ_GPIO_SWB | GPIO_IN);
424 422
425 request_irq(SPITZ_IRQ_GPIO_SYNC, spitzkbd_interrupt, SA_INTERRUPT, "Spitzkbd Sync", spitzkbd); 423 request_irq(SPITZ_IRQ_GPIO_SYNC, spitzkbd_interrupt,
426 request_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd_interrupt, SA_INTERRUPT, "Spitzkbd PwrOn", spitzkbd); 424 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING,
427 request_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd_hinge_isr, SA_INTERRUPT, "Spitzkbd SWA", spitzkbd); 425 "Spitzkbd Sync", spitzkbd);
428 request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr, SA_INTERRUPT, "Spitzkbd SWB", spitzkbd); 426 request_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd_interrupt,
429 427 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING,
430 set_irq_type(SPITZ_IRQ_GPIO_SYNC, IRQT_BOTHEDGE); 428 "Spitzkbd PwrOn", spitzkbd);
431 set_irq_type(SPITZ_IRQ_GPIO_ON_KEY, IRQT_BOTHEDGE); 429 request_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd_hinge_isr,
432 set_irq_type(SPITZ_IRQ_GPIO_SWA, IRQT_BOTHEDGE); 430 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING,
433 set_irq_type(SPITZ_IRQ_GPIO_SWB, IRQT_BOTHEDGE); 431 "Spitzkbd SWA", spitzkbd);
432 request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr,
433 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING,
434 "Spitzkbd SWB", spitzkbd);
434 435
435 printk(KERN_INFO "input: Spitz Keyboard Registered\n"); 436 printk(KERN_INFO "input: Spitz Keyboard Registered\n");
436 437
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index 1cd7657f7e42..1be963961c15 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -60,8 +60,6 @@ static struct fasync_struct *hp_sdc_rtc_async_queue;
60 60
61static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait); 61static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait);
62 62
63static loff_t hp_sdc_rtc_llseek(struct file *file, loff_t offset, int origin);
64
65static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, 63static ssize_t hp_sdc_rtc_read(struct file *file, char *buf,
66 size_t count, loff_t *ppos); 64 size_t count, loff_t *ppos);
67 65
@@ -387,11 +385,6 @@ static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd)
387 return 0; 385 return 0;
388} 386}
389 387
390static loff_t hp_sdc_rtc_llseek(struct file *file, loff_t offset, int origin)
391{
392 return -ESPIPE;
393}
394
395static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, 388static ssize_t hp_sdc_rtc_read(struct file *file, char *buf,
396 size_t count, loff_t *ppos) { 389 size_t count, loff_t *ppos) {
397 ssize_t retval; 390 ssize_t retval;
@@ -679,7 +672,7 @@ static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file,
679 672
680static struct file_operations hp_sdc_rtc_fops = { 673static struct file_operations hp_sdc_rtc_fops = {
681 .owner = THIS_MODULE, 674 .owner = THIS_MODULE,
682 .llseek = hp_sdc_rtc_llseek, 675 .llseek = no_llseek,
683 .read = hp_sdc_rtc_read, 676 .read = hp_sdc_rtc_read,
684 .poll = hp_sdc_rtc_poll, 677 .poll = hp_sdc_rtc_poll,
685 .ioctl = hp_sdc_rtc_ioctl, 678 .ioctl = hp_sdc_rtc_ioctl,
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c
index d13d4c8fe3c5..c8b2cc9f184c 100644
--- a/drivers/input/mouse/amimouse.c
+++ b/drivers/input/mouse/amimouse.c
@@ -41,7 +41,7 @@ static irqreturn_t amimouse_interrupt(int irq, void *dummy, struct pt_regs *fp)
41 unsigned short joy0dat, potgor; 41 unsigned short joy0dat, potgor;
42 int nx, ny, dx, dy; 42 int nx, ny, dx, dy;
43 43
44 joy0dat = custom.joy0dat; 44 joy0dat = amiga_custom.joy0dat;
45 45
46 nx = joy0dat & 0xff; 46 nx = joy0dat & 0xff;
47 ny = joy0dat >> 8; 47 ny = joy0dat >> 8;
@@ -57,7 +57,7 @@ static irqreturn_t amimouse_interrupt(int irq, void *dummy, struct pt_regs *fp)
57 amimouse_lastx = nx; 57 amimouse_lastx = nx;
58 amimouse_lasty = ny; 58 amimouse_lasty = ny;
59 59
60 potgor = custom.potgor; 60 potgor = amiga_custom.potgor;
61 61
62 input_regs(amimouse_dev, fp); 62 input_regs(amimouse_dev, fp);
63 63
@@ -77,7 +77,7 @@ static int amimouse_open(struct input_dev *dev)
77{ 77{
78 unsigned short joy0dat; 78 unsigned short joy0dat;
79 79
80 joy0dat = custom.joy0dat; 80 joy0dat = amiga_custom.joy0dat;
81 81
82 amimouse_lastx = joy0dat & 0xff; 82 amimouse_lastx = joy0dat & 0xff;
83 amimouse_lasty = joy0dat >> 8; 83 amimouse_lasty = joy0dat >> 8;
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 9b1ab5e7a98d..3df5eedf8f31 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -19,12 +19,12 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/amba/bus.h>
23#include <linux/amba/kmi.h>
24#include <linux/clk.h>
22 25
23#include <asm/io.h> 26#include <asm/io.h>
24#include <asm/irq.h> 27#include <asm/irq.h>
25#include <asm/hardware/amba.h>
26#include <asm/hardware/amba_kmi.h>
27#include <asm/hardware/clock.h>
28 28
29#define KMI_BASE (kmi->base) 29#define KMI_BASE (kmi->base)
30 30
@@ -72,13 +72,9 @@ static int amba_kmi_open(struct serio *io)
72 unsigned int divisor; 72 unsigned int divisor;
73 int ret; 73 int ret;
74 74
75 ret = clk_use(kmi->clk);
76 if (ret)
77 goto out;
78
79 ret = clk_enable(kmi->clk); 75 ret = clk_enable(kmi->clk);
80 if (ret) 76 if (ret)
81 goto clk_unuse; 77 goto out;
82 78
83 divisor = clk_get_rate(kmi->clk) / 8000000 - 1; 79 divisor = clk_get_rate(kmi->clk) / 8000000 - 1;
84 writeb(divisor, KMICLKDIV); 80 writeb(divisor, KMICLKDIV);
@@ -97,8 +93,6 @@ static int amba_kmi_open(struct serio *io)
97 93
98 clk_disable: 94 clk_disable:
99 clk_disable(kmi->clk); 95 clk_disable(kmi->clk);
100 clk_unuse:
101 clk_unuse(kmi->clk);
102 out: 96 out:
103 return ret; 97 return ret;
104} 98}
@@ -111,7 +105,6 @@ static void amba_kmi_close(struct serio *io)
111 105
112 free_irq(kmi->irq, kmi); 106 free_irq(kmi->irq, kmi);
113 clk_disable(kmi->clk); 107 clk_disable(kmi->clk);
114 clk_unuse(kmi->clk);
115} 108}
116 109
117static int amba_kmi_probe(struct amba_device *dev, void *id) 110static int amba_kmi_probe(struct amba_device *dev, void *id)
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c
index 3f0df3330fb2..ebd9976fc811 100644
--- a/drivers/input/serio/sa1111ps2.c
+++ b/drivers/input/serio/sa1111ps2.c
@@ -20,7 +20,6 @@
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21 21
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/irq.h>
24#include <asm/system.h> 23#include <asm/system.h>
25 24
26#include <asm/hardware/sa1111.h> 25#include <asm/hardware/sa1111.h>
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 1bd88fca0542..54a680cc704d 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -96,6 +96,7 @@ static int serport_ldisc_open(struct tty_struct *tty)
96 init_waitqueue_head(&serport->wait); 96 init_waitqueue_head(&serport->wait);
97 97
98 tty->disc_data = serport; 98 tty->disc_data = serport;
99 tty->receive_room = 256;
99 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); 100 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
100 101
101 return 0; 102 return 0;
@@ -140,17 +141,6 @@ out:
140} 141}
141 142
142/* 143/*
143 * serport_ldisc_room() reports how much room we do have for receiving data.
144 * Although we in fact have infinite room, we need to specify some value
145 * here, and 256 seems to be reasonable.
146 */
147
148static int serport_ldisc_room(struct tty_struct *tty)
149{
150 return 256;
151}
152
153/*
154 * serport_ldisc_read() just waits indefinitely if everything goes well. 144 * serport_ldisc_read() just waits indefinitely if everything goes well.
155 * However, when the serio driver closes the serio port, it finishes, 145 * However, when the serio driver closes the serio port, it finishes,
156 * returning 0 characters. 146 * returning 0 characters.
@@ -237,7 +227,6 @@ static struct tty_ldisc serport_ldisc = {
237 .read = serport_ldisc_read, 227 .read = serport_ldisc_read,
238 .ioctl = serport_ldisc_ioctl, 228 .ioctl = serport_ldisc_ioctl,
239 .receive_buf = serport_ldisc_receive, 229 .receive_buf = serport_ldisc_receive,
240 .receive_room = serport_ldisc_room,
241 .write_wakeup = serport_ldisc_write_wakeup 230 .write_wakeup = serport_ldisc_write_wakeup
242}; 231};
243 232