aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:39:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:39:36 -0400
commit0dd52d0df02733dfc2d5f3824e41b96492305384 (patch)
tree4cfd84b7a66d71d83c624275d889136fb23a33c9 /drivers/input/misc
parentc37efa932598de5e30330a1414e34d9e082e0d9e (diff)
parentfde1132374c9ba7da98a73b9a3c150dca6cf8502 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: add driver for Atmel AT42QT2160 Sensor Chip Input: max7359 - use threaded IRQs Input: add driver for Maxim MAX7359 key switch controller Input: add driver for ADP5588 QWERTY I2C Keypad Input: add touchscreen driver for MELFAS MCS-5000 controller Input: add driver for OpenCores Keyboard Controller Input: dm355evm_keys - remove dm355evm_keys_hardirq Input: synaptics_i2c - switch to using __cancel_delayed_work() Input: ad7879 - add support for AD7889 Input: atkbd - rely on input core to restore state on resume Input: add generic suspend and resume for input devices Input: libps2 - additional locking for i8042 ports
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/dm355evm_keys.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c
index 0918acae584a..f2b67dc81d80 100644
--- a/drivers/input/misc/dm355evm_keys.c
+++ b/drivers/input/misc/dm355evm_keys.c
@@ -96,7 +96,13 @@ static struct {
96 { 0x3169, KEY_PAUSE, }, 96 { 0x3169, KEY_PAUSE, },
97}; 97};
98 98
99/* runs in an IRQ thread -- can (and will!) sleep */ 99/*
100 * Because we communicate with the MSP430 using I2C, and all I2C calls
101 * in Linux sleep, we use a threaded IRQ handler. The IRQ itself is
102 * active low, but we go through the GPIO controller so we can trigger
103 * on falling edges and not worry about enabling/disabling the IRQ in
104 * the keypress handling path.
105 */
100static irqreturn_t dm355evm_keys_irq(int irq, void *_keys) 106static irqreturn_t dm355evm_keys_irq(int irq, void *_keys)
101{ 107{
102 struct dm355evm_keys *keys = _keys; 108 struct dm355evm_keys *keys = _keys;
@@ -171,18 +177,6 @@ static irqreturn_t dm355evm_keys_irq(int irq, void *_keys)
171 return IRQ_HANDLED; 177 return IRQ_HANDLED;
172} 178}
173 179
174/*
175 * Because we communicate with the MSP430 using I2C, and all I2C calls
176 * in Linux sleep, we use a threaded IRQ handler. The IRQ itself is
177 * active low, but we go through the GPIO controller so we can trigger
178 * on falling edges and not worry about enabling/disabling the IRQ in
179 * the keypress handling path.
180 */
181static irqreturn_t dm355evm_keys_hardirq(int irq, void *_keys)
182{
183 return IRQ_WAKE_THREAD;
184}
185
186static int dm355evm_setkeycode(struct input_dev *dev, int index, int keycode) 180static int dm355evm_setkeycode(struct input_dev *dev, int index, int keycode)
187{ 181{
188 u16 old_keycode; 182 u16 old_keycode;
@@ -257,10 +251,8 @@ static int __devinit dm355evm_keys_probe(struct platform_device *pdev)
257 251
258 /* REVISIT: flush the event queue? */ 252 /* REVISIT: flush the event queue? */
259 253
260 status = request_threaded_irq(keys->irq, 254 status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq,
261 dm355evm_keys_hardirq, dm355evm_keys_irq, 255 IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), keys);
262 IRQF_TRIGGER_FALLING,
263 dev_name(&pdev->dev), keys);
264 if (status < 0) 256 if (status < 0)
265 goto fail1; 257 goto fail1;
266 258