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: iforce - wait for command completion when closing the device Input: twl4030-pwrbutton - switch to using threaded IRQ Input: twl4030_keypad - switch to using threaded IRQ Input: lifebook - add CONFIG_DMI dependency Input: wistron - fix test for CONFIG_PM Input: psmouse - fix compile warning in hgpk module Input: matrix-keypad - handle cases when GPIOs can't be wakeup sources Input: iforce - fix oops on device disconnect Input: ff-memless - add notion of direction to for rumble effects Input: ff-memless - another fix for signed to unsigned overflow Input: ff-memless - start playing FF effects immediately Input: serio - do not mark kseriod freezable anymore Input: speed up suspend/shutdown for PS/2 mice and keyboards
This commit is contained in:
@@ -134,7 +134,8 @@ static const unsigned short atkbd_unxlate_table[128] = {
|
||||
#define ATKBD_CMD_GETID 0x02f2
|
||||
#define ATKBD_CMD_SETREP 0x10f3
|
||||
#define ATKBD_CMD_ENABLE 0x00f4
|
||||
#define ATKBD_CMD_RESET_DIS 0x00f5
|
||||
#define ATKBD_CMD_RESET_DIS 0x00f5 /* Reset to defaults and disable */
|
||||
#define ATKBD_CMD_RESET_DEF 0x00f6 /* Reset to defaults */
|
||||
#define ATKBD_CMD_SETALL_MBR 0x00fa
|
||||
#define ATKBD_CMD_RESET_BAT 0x02ff
|
||||
#define ATKBD_CMD_RESEND 0x00fe
|
||||
@@ -836,7 +837,7 @@ static void atkbd_cleanup(struct serio *serio)
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
|
||||
atkbd_disable(atkbd);
|
||||
ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT);
|
||||
ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_DEF);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -29,11 +29,13 @@ struct matrix_keypad {
|
||||
unsigned short *keycodes;
|
||||
unsigned int row_shift;
|
||||
|
||||
DECLARE_BITMAP(disabled_gpios, MATRIX_MAX_ROWS);
|
||||
|
||||
uint32_t last_key_state[MATRIX_MAX_COLS];
|
||||
struct delayed_work work;
|
||||
spinlock_t lock;
|
||||
bool scan_pending;
|
||||
bool stopped;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -222,9 +224,16 @@ static int matrix_keypad_suspend(struct device *dev)
|
||||
|
||||
matrix_keypad_stop(keypad->input_dev);
|
||||
|
||||
if (device_may_wakeup(&pdev->dev))
|
||||
for (i = 0; i < pdata->num_row_gpios; i++)
|
||||
enable_irq_wake(gpio_to_irq(pdata->row_gpios[i]));
|
||||
if (device_may_wakeup(&pdev->dev)) {
|
||||
for (i = 0; i < pdata->num_row_gpios; i++) {
|
||||
if (!test_bit(i, keypad->disabled_gpios)) {
|
||||
unsigned int gpio = pdata->row_gpios[i];
|
||||
|
||||
if (enable_irq_wake(gpio_to_irq(gpio)) == 0)
|
||||
__set_bit(i, keypad->disabled_gpios);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -236,9 +245,15 @@ static int matrix_keypad_resume(struct device *dev)
|
||||
const struct matrix_keypad_platform_data *pdata = keypad->pdata;
|
||||
int i;
|
||||
|
||||
if (device_may_wakeup(&pdev->dev))
|
||||
for (i = 0; i < pdata->num_row_gpios; i++)
|
||||
disable_irq_wake(gpio_to_irq(pdata->row_gpios[i]));
|
||||
if (device_may_wakeup(&pdev->dev)) {
|
||||
for (i = 0; i < pdata->num_row_gpios; i++) {
|
||||
if (test_and_clear_bit(i, keypad->disabled_gpios)) {
|
||||
unsigned int gpio = pdata->row_gpios[i];
|
||||
|
||||
disable_irq_wake(gpio_to_irq(gpio));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
matrix_keypad_start(keypad->input_dev);
|
||||
|
||||
|
@@ -253,14 +253,6 @@ static irqreturn_t do_kp_irq(int irq, void *_kp)
|
||||
u8 reg;
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
/* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
|
||||
* we don't want and can't tolerate. Although it might be
|
||||
* friendlier not to borrow this thread context...
|
||||
*/
|
||||
local_irq_enable();
|
||||
#endif
|
||||
|
||||
/* Read & Clear TWL4030 pending interrupt */
|
||||
ret = twl4030_kpread(kp, ®, KEYP_ISR1, 1);
|
||||
|
||||
@@ -403,7 +395,8 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
|
||||
*
|
||||
* NOTE: we assume this host is wired to TWL4040 INT1, not INT2 ...
|
||||
*/
|
||||
error = request_irq(kp->irq, do_kp_irq, 0, pdev->name, kp);
|
||||
error = request_threaded_irq(kp->irq, NULL, do_kp_irq,
|
||||
0, pdev->name, kp);
|
||||
if (error) {
|
||||
dev_info(kp->dbg_dev, "request_irq failed for irq no=%d\n",
|
||||
kp->irq);
|
||||
|
Reference in New Issue
Block a user