Commit e704966c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Dmitry writes:
  "Input updates for v4.19-rc5

   Just a few driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: uinput - allow for max == min during input_absinfo validation
  Input: elantech - enable middle button of touchpad on ThinkPad P72
  Input: atakbd - fix Atari CapsLock behaviour
  Input: atakbd - fix Atari keymap
  Input: egalax_ts - add system wakeup support
  Input: gpio-keys - fix a documentation index issue
parents 2f19e7a7 4fef1250
Device-Tree bindings for input/gpio_keys.c keyboard driver Device-Tree bindings for input/keyboard/gpio_keys.c keyboard driver
Required properties: Required properties:
- compatible = "gpio-keys"; - compatible = "gpio-keys";
......
...@@ -75,8 +75,7 @@ MODULE_LICENSE("GPL"); ...@@ -75,8 +75,7 @@ MODULE_LICENSE("GPL");
*/ */
static unsigned char atakbd_keycode[0x72] = { /* American layout */ static unsigned char atakbd_keycode[0x73] = { /* American layout */
[0] = KEY_GRAVE,
[1] = KEY_ESC, [1] = KEY_ESC,
[2] = KEY_1, [2] = KEY_1,
[3] = KEY_2, [3] = KEY_2,
...@@ -117,9 +116,9 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */ ...@@ -117,9 +116,9 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */
[38] = KEY_L, [38] = KEY_L,
[39] = KEY_SEMICOLON, [39] = KEY_SEMICOLON,
[40] = KEY_APOSTROPHE, [40] = KEY_APOSTROPHE,
[41] = KEY_BACKSLASH, /* FIXME, '#' */ [41] = KEY_GRAVE,
[42] = KEY_LEFTSHIFT, [42] = KEY_LEFTSHIFT,
[43] = KEY_GRAVE, /* FIXME: '~' */ [43] = KEY_BACKSLASH,
[44] = KEY_Z, [44] = KEY_Z,
[45] = KEY_X, [45] = KEY_X,
[46] = KEY_C, [46] = KEY_C,
...@@ -145,45 +144,34 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */ ...@@ -145,45 +144,34 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */
[66] = KEY_F8, [66] = KEY_F8,
[67] = KEY_F9, [67] = KEY_F9,
[68] = KEY_F10, [68] = KEY_F10,
[69] = KEY_ESC, [71] = KEY_HOME,
[70] = KEY_DELETE, [72] = KEY_UP,
[71] = KEY_KP7,
[72] = KEY_KP8,
[73] = KEY_KP9,
[74] = KEY_KPMINUS, [74] = KEY_KPMINUS,
[75] = KEY_KP4, [75] = KEY_LEFT,
[76] = KEY_KP5, [77] = KEY_RIGHT,
[77] = KEY_KP6,
[78] = KEY_KPPLUS, [78] = KEY_KPPLUS,
[79] = KEY_KP1, [80] = KEY_DOWN,
[80] = KEY_KP2, [82] = KEY_INSERT,
[81] = KEY_KP3, [83] = KEY_DELETE,
[82] = KEY_KP0,
[83] = KEY_KPDOT,
[90] = KEY_KPLEFTPAREN,
[91] = KEY_KPRIGHTPAREN,
[92] = KEY_KPASTERISK, /* FIXME */
[93] = KEY_KPASTERISK,
[94] = KEY_KPPLUS,
[95] = KEY_HELP,
[96] = KEY_102ND, [96] = KEY_102ND,
[97] = KEY_KPASTERISK, /* FIXME */ [97] = KEY_UNDO,
[98] = KEY_KPSLASH, [98] = KEY_HELP,
[99] = KEY_KPLEFTPAREN, [99] = KEY_KPLEFTPAREN,
[100] = KEY_KPRIGHTPAREN, [100] = KEY_KPRIGHTPAREN,
[101] = KEY_KPSLASH, [101] = KEY_KPSLASH,
[102] = KEY_KPASTERISK, [102] = KEY_KPASTERISK,
[103] = KEY_UP, [103] = KEY_KP7,
[104] = KEY_KPASTERISK, /* FIXME */ [104] = KEY_KP8,
[105] = KEY_LEFT, [105] = KEY_KP9,
[106] = KEY_RIGHT, [106] = KEY_KP4,
[107] = KEY_KPASTERISK, /* FIXME */ [107] = KEY_KP5,
[108] = KEY_DOWN, [108] = KEY_KP6,
[109] = KEY_KPASTERISK, /* FIXME */ [109] = KEY_KP1,
[110] = KEY_KPASTERISK, /* FIXME */ [110] = KEY_KP2,
[111] = KEY_KPASTERISK, /* FIXME */ [111] = KEY_KP3,
[112] = KEY_KPASTERISK, /* FIXME */ [112] = KEY_KP0,
[113] = KEY_KPASTERISK /* FIXME */ [113] = KEY_KPDOT,
[114] = KEY_KPENTER,
}; };
static struct input_dev *atakbd_dev; static struct input_dev *atakbd_dev;
...@@ -191,21 +179,15 @@ static struct input_dev *atakbd_dev; ...@@ -191,21 +179,15 @@ static struct input_dev *atakbd_dev;
static void atakbd_interrupt(unsigned char scancode, char down) static void atakbd_interrupt(unsigned char scancode, char down)
{ {
if (scancode < 0x72) { /* scancodes < 0xf2 are keys */ if (scancode < 0x73) { /* scancodes < 0xf3 are keys */
// report raw events here? // report raw events here?
scancode = atakbd_keycode[scancode]; scancode = atakbd_keycode[scancode];
if (scancode == KEY_CAPSLOCK) { /* CapsLock is a toggle switch key on Amiga */ input_report_key(atakbd_dev, scancode, down);
input_report_key(atakbd_dev, scancode, 1); input_sync(atakbd_dev);
input_report_key(atakbd_dev, scancode, 0); } else /* scancodes >= 0xf3 are mouse data, most likely */
input_sync(atakbd_dev);
} else {
input_report_key(atakbd_dev, scancode, down);
input_sync(atakbd_dev);
}
} else /* scancodes >= 0xf2 are mouse data, most likely */
printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode); printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode);
return; return;
......
...@@ -410,7 +410,7 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code, ...@@ -410,7 +410,7 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
min = abs->minimum; min = abs->minimum;
max = abs->maximum; max = abs->maximum;
if ((min != 0 || max != 0) && max <= min) { if ((min != 0 || max != 0) && max < min) {
printk(KERN_DEBUG printk(KERN_DEBUG
"%s: invalid abs[%02x] min:%d max:%d\n", "%s: invalid abs[%02x] min:%d max:%d\n",
UINPUT_NAME, code, min, max); UINPUT_NAME, code, min, max);
......
...@@ -1178,6 +1178,8 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = { ...@@ -1178,6 +1178,8 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = {
static const char * const middle_button_pnp_ids[] = { static const char * const middle_button_pnp_ids[] = {
"LEN2131", /* ThinkPad P52 w/ NFC */ "LEN2131", /* ThinkPad P52 w/ NFC */
"LEN2132", /* ThinkPad P52 */ "LEN2132", /* ThinkPad P52 */
"LEN2133", /* ThinkPad P72 w/ NFC */
"LEN2134", /* ThinkPad P72 */
NULL NULL
}; };
......
...@@ -241,6 +241,9 @@ static int __maybe_unused egalax_ts_suspend(struct device *dev) ...@@ -241,6 +241,9 @@ static int __maybe_unused egalax_ts_suspend(struct device *dev)
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
int ret; int ret;
if (device_may_wakeup(dev))
return enable_irq_wake(client->irq);
ret = i2c_master_send(client, suspend_cmd, MAX_I2C_DATA_LEN); ret = i2c_master_send(client, suspend_cmd, MAX_I2C_DATA_LEN);
return ret > 0 ? 0 : ret; return ret > 0 ? 0 : ret;
} }
...@@ -249,6 +252,9 @@ static int __maybe_unused egalax_ts_resume(struct device *dev) ...@@ -249,6 +252,9 @@ static int __maybe_unused egalax_ts_resume(struct device *dev)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
if (device_may_wakeup(dev))
return disable_irq_wake(client->irq);
return egalax_wake_up_device(client); return egalax_wake_up_device(client);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment