aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-03-01 13:31:53 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-03-01 13:31:53 -0500
commit04421fe2671c1790ab6529fad87ce8c73af0e1eb (patch)
treed2f803b4eef6108648f1beee6bf97a342cd9bc73 /drivers/input
parent7fb45edba8b5206e645572a682c946f67375447e (diff)
parentcfbf8d4857c26a8a307fb7cd258074c9dcd8c691 (diff)
Merge tag 'v3.14-rc4' into next
Merge with Linux 3.14-rc4 to bring devm_request_any_context_irq().
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/input.c4
-rw-r--r--drivers/input/joystick/xpad.c6
-rw-r--r--drivers/input/keyboard/tegra-kbc.c13
-rw-r--r--drivers/input/misc/Kconfig2
-rw-r--r--drivers/input/misc/atlas_btns.c2
-rw-r--r--drivers/input/misc/xen-kbdfront.c4
-rw-r--r--drivers/input/serio/ambakmi.c2
-rw-r--r--drivers/input/serio/serport.c28
-rw-r--r--drivers/input/touchscreen/Kconfig2
-rw-r--r--drivers/input/touchscreen/ti_am335x_tsc.c4
-rw-r--r--drivers/input/touchscreen/zforce_ts.c21
11 files changed, 57 insertions, 31 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 692435a321af..1c4c0db05550 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1909,6 +1909,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int
1909 break; 1909 break;
1910 1910
1911 case EV_ABS: 1911 case EV_ABS:
1912 input_alloc_absinfo(dev);
1913 if (!dev->absinfo)
1914 return;
1915
1912 __set_bit(code, dev->absbit); 1916 __set_bit(code, dev->absbit);
1913 break; 1917 break;
1914 1918
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 618ea0acb86f..603fe0dd3682 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -124,6 +124,8 @@ static const struct xpad_device {
124 { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, 124 { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
125 { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, 125 { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
126 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX }, 126 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
127 { 0x046d, 0xc21d, "Logitech Gamepad F310", 0, XTYPE_XBOX360 },
128 { 0x046d, 0xc21f, "Logitech Gamepad F710", 0, XTYPE_XBOX360 },
127 { 0x046d, 0xc242, "Logitech Chillstream Controller", 0, XTYPE_XBOX360 }, 129 { 0x046d, 0xc242, "Logitech Chillstream Controller", 0, XTYPE_XBOX360 },
128 { 0x046d, 0xca84, "Logitech Xbox Cordless Controller", 0, XTYPE_XBOX }, 130 { 0x046d, 0xca84, "Logitech Xbox Cordless Controller", 0, XTYPE_XBOX },
129 { 0x046d, 0xca88, "Logitech Compact Controller for Xbox", 0, XTYPE_XBOX }, 131 { 0x046d, 0xca88, "Logitech Compact Controller for Xbox", 0, XTYPE_XBOX },
@@ -165,8 +167,8 @@ static const struct xpad_device {
165 { 0x1430, 0x4748, "RedOctane Guitar Hero X-plorer", 0, XTYPE_XBOX360 }, 167 { 0x1430, 0x4748, "RedOctane Guitar Hero X-plorer", 0, XTYPE_XBOX360 },
166 { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 168 { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
167 { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, 169 { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 },
168 { 0x1689, 0xfd00, "Razer Onza Tournament Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 170 { 0x1689, 0xfd00, "Razer Onza Tournament Edition", 0, XTYPE_XBOX360 },
169 { 0x1689, 0xfd01, "Razer Onza Classic Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 171 { 0x1689, 0xfd01, "Razer Onza Classic Edition", 0, XTYPE_XBOX360 },
170 { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 }, 172 { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 },
171 { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 173 { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
172 { 0x1bad, 0xf016, "Mad Catz Xbox 360 Controller", 0, XTYPE_XBOX360 }, 174 { 0x1bad, 0xf016, "Mad Catz Xbox 360 Controller", 0, XTYPE_XBOX360 },
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 8508879f6faf..9757a58bc897 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -31,7 +31,7 @@
31#include <linux/clk.h> 31#include <linux/clk.h>
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/input/matrix_keypad.h> 33#include <linux/input/matrix_keypad.h>
34#include <linux/clk/tegra.h> 34#include <linux/reset.h>
35#include <linux/err.h> 35#include <linux/err.h>
36 36
37#define KBC_MAX_KPENT 8 37#define KBC_MAX_KPENT 8
@@ -116,6 +116,7 @@ struct tegra_kbc {
116 u32 wakeup_key; 116 u32 wakeup_key;
117 struct timer_list timer; 117 struct timer_list timer;
118 struct clk *clk; 118 struct clk *clk;
119 struct reset_control *rst;
119 const struct tegra_kbc_hw_support *hw_support; 120 const struct tegra_kbc_hw_support *hw_support;
120 int max_keys; 121 int max_keys;
121 int num_rows_and_columns; 122 int num_rows_and_columns;
@@ -373,9 +374,9 @@ static int tegra_kbc_start(struct tegra_kbc *kbc)
373 clk_prepare_enable(kbc->clk); 374 clk_prepare_enable(kbc->clk);
374 375
375 /* Reset the KBC controller to clear all previous status.*/ 376 /* Reset the KBC controller to clear all previous status.*/
376 tegra_periph_reset_assert(kbc->clk); 377 reset_control_assert(kbc->rst);
377 udelay(100); 378 udelay(100);
378 tegra_periph_reset_deassert(kbc->clk); 379 reset_control_assert(kbc->rst);
379 udelay(100); 380 udelay(100);
380 381
381 tegra_kbc_config_pins(kbc); 382 tegra_kbc_config_pins(kbc);
@@ -663,6 +664,12 @@ static int tegra_kbc_probe(struct platform_device *pdev)
663 return PTR_ERR(kbc->clk); 664 return PTR_ERR(kbc->clk);
664 } 665 }
665 666
667 kbc->rst = devm_reset_control_get(&pdev->dev, "kbc");
668 if (IS_ERR(kbc->rst)) {
669 dev_err(&pdev->dev, "failed to get keyboard reset\n");
670 return PTR_ERR(kbc->rst);
671 }
672
666 /* 673 /*
667 * The time delay between two consecutive reads of the FIFO is 674 * The time delay between two consecutive reads of the FIFO is
668 * the sum of the repeat time and the time taken for scanning 675 * the sum of the repeat time and the time taken for scanning
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 4ffc39732513..7904ab05527a 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -168,7 +168,7 @@ config INPUT_MAX8997_HAPTIC
168 168
169config INPUT_MC13783_PWRBUTTON 169config INPUT_MC13783_PWRBUTTON
170 tristate "MC13783 ON buttons" 170 tristate "MC13783 ON buttons"
171 depends on MFD_MC13783 171 depends on MFD_MC13XXX
172 help 172 help
173 Support the ON buttons of MC13783 PMIC as an input device 173 Support the ON buttons of MC13783 PMIC as an input device
174 reporting power button status. 174 reporting power button status.
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c
index c0c5b63af90a..638165c78e75 100644
--- a/drivers/input/misc/atlas_btns.c
+++ b/drivers/input/misc/atlas_btns.c
@@ -27,8 +27,8 @@
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/input.h> 28#include <linux/input.h>
29#include <linux/types.h> 29#include <linux/types.h>
30#include <linux/acpi.h>
30#include <asm/uaccess.h> 31#include <asm/uaccess.h>
31#include <acpi/acpi_drivers.h>
32 32
33#define ACPI_ATLAS_NAME "Atlas ACPI" 33#define ACPI_ATLAS_NAME "Atlas ACPI"
34#define ACPI_ATLAS_CLASS "Atlas" 34#define ACPI_ATLAS_CLASS "Atlas"
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index e21c1816a8f9..fbfdc10573be 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -29,6 +29,7 @@
29#include <xen/interface/io/fbif.h> 29#include <xen/interface/io/fbif.h>
30#include <xen/interface/io/kbdif.h> 30#include <xen/interface/io/kbdif.h>
31#include <xen/xenbus.h> 31#include <xen/xenbus.h>
32#include <xen/platform_pci.h>
32 33
33struct xenkbd_info { 34struct xenkbd_info {
34 struct input_dev *kbd; 35 struct input_dev *kbd;
@@ -380,6 +381,9 @@ static int __init xenkbd_init(void)
380 if (xen_initial_domain()) 381 if (xen_initial_domain())
381 return -ENODEV; 382 return -ENODEV;
382 383
384 if (!xen_has_pv_devices())
385 return -ENODEV;
386
383 return xenbus_register_frontend(&xenkbd_driver); 387 return xenbus_register_frontend(&xenkbd_driver);
384} 388}
385 389
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 3e3776c7bd21..762b08432de0 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -166,8 +166,6 @@ static int amba_kmi_remove(struct amba_device *dev)
166{ 166{
167 struct amba_kmi_port *kmi = amba_get_drvdata(dev); 167 struct amba_kmi_port *kmi = amba_get_drvdata(dev);
168 168
169 amba_set_drvdata(dev, NULL);
170
171 serio_unregister_port(kmi->io); 169 serio_unregister_port(kmi->io);
172 clk_put(kmi->clk); 170 clk_put(kmi->clk);
173 iounmap(kmi->base); 171 iounmap(kmi->base);
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 8755f5f3ad37..0cb7ef59071b 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -124,7 +124,7 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
124{ 124{
125 struct serport *serport = (struct serport*) tty->disc_data; 125 struct serport *serport = (struct serport*) tty->disc_data;
126 unsigned long flags; 126 unsigned long flags;
127 unsigned int ch_flags; 127 unsigned int ch_flags = 0;
128 int i; 128 int i;
129 129
130 spin_lock_irqsave(&serport->lock, flags); 130 spin_lock_irqsave(&serport->lock, flags);
@@ -133,18 +133,20 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
133 goto out; 133 goto out;
134 134
135 for (i = 0; i < count; i++) { 135 for (i = 0; i < count; i++) {
136 switch (fp[i]) { 136 if (fp) {
137 case TTY_FRAME: 137 switch (fp[i]) {
138 ch_flags = SERIO_FRAME; 138 case TTY_FRAME:
139 break; 139 ch_flags = SERIO_FRAME;
140 140 break;
141 case TTY_PARITY: 141
142 ch_flags = SERIO_PARITY; 142 case TTY_PARITY:
143 break; 143 ch_flags = SERIO_PARITY;
144 144 break;
145 default: 145
146 ch_flags = 0; 146 default:
147 break; 147 ch_flags = 0;
148 break;
149 }
148 } 150 }
149 151
150 serio_interrupt(serport->serio, cp[i], ch_flags); 152 serio_interrupt(serport->serio, cp[i], ch_flags);
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 961d58d32647..07e9e82029d1 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -717,7 +717,7 @@ config TOUCHSCREEN_USB_COMPOSITE
717 717
718config TOUCHSCREEN_MC13783 718config TOUCHSCREEN_MC13783
719 tristate "Freescale MC13783 touchscreen input driver" 719 tristate "Freescale MC13783 touchscreen input driver"
720 depends on MFD_MC13783 720 depends on MFD_MC13XXX
721 help 721 help
722 Say Y here if you have an Freescale MC13783 PMIC on your 722 Say Y here if you have an Freescale MC13783 PMIC on your
723 board and want to use its touchscreen 723 board and want to use its touchscreen
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
index 6c9cd1268dc3..4e793a17361f 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -197,7 +197,7 @@ static void titsc_step_config(struct titsc *ts_dev)
197 /* The steps1 … end and bit 0 for TS_Charge */ 197 /* The steps1 … end and bit 0 for TS_Charge */
198 stepenable = (1 << (end_step + 2)) - 1; 198 stepenable = (1 << (end_step + 2)) - 1;
199 ts_dev->step_mask = stepenable; 199 ts_dev->step_mask = stepenable;
200 am335x_tsc_se_set(ts_dev->mfd_tscadc, ts_dev->step_mask); 200 am335x_tsc_se_set_cache(ts_dev->mfd_tscadc, ts_dev->step_mask);
201} 201}
202 202
203static void titsc_read_coordinates(struct titsc *ts_dev, 203static void titsc_read_coordinates(struct titsc *ts_dev,
@@ -321,7 +321,7 @@ static irqreturn_t titsc_irq(int irq, void *dev)
321 321
322 if (irqclr) { 322 if (irqclr) {
323 titsc_writel(ts_dev, REG_IRQSTATUS, irqclr); 323 titsc_writel(ts_dev, REG_IRQSTATUS, irqclr);
324 am335x_tsc_se_set(ts_dev->mfd_tscadc, ts_dev->step_mask); 324 am335x_tsc_se_set_cache(ts_dev->mfd_tscadc, ts_dev->step_mask);
325 return IRQ_HANDLED; 325 return IRQ_HANDLED;
326 } 326 }
327 return IRQ_NONE; 327 return IRQ_NONE;
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index bdc936cb8445..01d30cedde46 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -461,7 +461,18 @@ static void zforce_complete(struct zforce_ts *ts, int cmd, int result)
461 } 461 }
462} 462}
463 463
464static irqreturn_t zforce_interrupt(int irq, void *dev_id) 464static irqreturn_t zforce_irq(int irq, void *dev_id)
465{
466 struct zforce_ts *ts = dev_id;
467 struct i2c_client *client = ts->client;
468
469 if (ts->suspended && device_may_wakeup(&client->dev))
470 pm_wakeup_event(&client->dev, 500);
471
472 return IRQ_WAKE_THREAD;
473}
474
475static irqreturn_t zforce_irq_thread(int irq, void *dev_id)
465{ 476{
466 struct zforce_ts *ts = dev_id; 477 struct zforce_ts *ts = dev_id;
467 struct i2c_client *client = ts->client; 478 struct i2c_client *client = ts->client;
@@ -471,12 +482,10 @@ static irqreturn_t zforce_interrupt(int irq, void *dev_id)
471 u8 *payload; 482 u8 *payload;
472 483
473 /* 484 /*
474 * When suspended, emit a wakeup signal if necessary and return. 485 * When still suspended, return.
475 * Due to the level-interrupt we will get re-triggered later. 486 * Due to the level-interrupt we will get re-triggered later.
476 */ 487 */
477 if (ts->suspended) { 488 if (ts->suspended) {
478 if (device_may_wakeup(&client->dev))
479 pm_wakeup_event(&client->dev, 500);
480 msleep(20); 489 msleep(20);
481 return IRQ_HANDLED; 490 return IRQ_HANDLED;
482 } 491 }
@@ -814,8 +823,8 @@ static int zforce_probe(struct i2c_client *client,
814 * Therefore we can trigger the interrupt anytime it is low and do 823 * Therefore we can trigger the interrupt anytime it is low and do
815 * not need to limit it to the interrupt edge. 824 * not need to limit it to the interrupt edge.
816 */ 825 */
817 ret = devm_request_threaded_irq(&client->dev, client->irq, NULL, 826 ret = devm_request_threaded_irq(&client->dev, client->irq,
818 zforce_interrupt, 827 zforce_irq, zforce_irq_thread,
819 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 828 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
820 input_dev->name, ts); 829 input_dev->name, ts);
821 if (ret) { 830 if (ret) {