diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-05-14 19:49:19 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-05-14 19:49:19 -0400 |
commit | 879f99ef2c4c05d9a7f0a67a05f1415663119825 (patch) | |
tree | 0399664761f675eef741f8b08b92635069586151 /drivers/input/keyboard | |
parent | 70a26071f8552a0f193cf442f424decfe0f2e569 (diff) | |
parent | d6d211db37e75de2ddc3a4f979038c40df7cc79c (diff) |
Merge tag 'v3.15-rc5' into next
Merge with Linux 3.15-rc5 to sync up Wacom and other changes.
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/adp5588-keys.c | 12 | ||||
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 29 | ||||
-rw-r--r-- | drivers/input/keyboard/tca8418_keypad.c | 7 |
3 files changed, 46 insertions, 2 deletions
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index bb3b57bea8ba..5ef7fcf0e250 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c | |||
@@ -76,8 +76,18 @@ static int adp5588_gpio_get_value(struct gpio_chip *chip, unsigned off) | |||
76 | struct adp5588_kpad *kpad = container_of(chip, struct adp5588_kpad, gc); | 76 | struct adp5588_kpad *kpad = container_of(chip, struct adp5588_kpad, gc); |
77 | unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); | 77 | unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); |
78 | unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]); | 78 | unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]); |
79 | int val; | ||
79 | 80 | ||
80 | return !!(adp5588_read(kpad->client, GPIO_DAT_STAT1 + bank) & bit); | 81 | mutex_lock(&kpad->gpio_lock); |
82 | |||
83 | if (kpad->dir[bank] & bit) | ||
84 | val = kpad->dat_out[bank]; | ||
85 | else | ||
86 | val = adp5588_read(kpad->client, GPIO_DAT_STAT1 + bank); | ||
87 | |||
88 | mutex_unlock(&kpad->gpio_lock); | ||
89 | |||
90 | return !!(val & bit); | ||
81 | } | 91 | } |
82 | 92 | ||
83 | static void adp5588_gpio_set_value(struct gpio_chip *chip, | 93 | static void adp5588_gpio_set_value(struct gpio_chip *chip, |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 2626773ff29b..2dd1d0dd4f7d 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -243,6 +243,12 @@ static void (*atkbd_platform_fixup)(struct atkbd *, const void *data); | |||
243 | static void *atkbd_platform_fixup_data; | 243 | static void *atkbd_platform_fixup_data; |
244 | static unsigned int (*atkbd_platform_scancode_fixup)(struct atkbd *, unsigned int); | 244 | static unsigned int (*atkbd_platform_scancode_fixup)(struct atkbd *, unsigned int); |
245 | 245 | ||
246 | /* | ||
247 | * Certain keyboards to not like ATKBD_CMD_RESET_DIS and stop responding | ||
248 | * to many commands until full reset (ATKBD_CMD_RESET_BAT) is performed. | ||
249 | */ | ||
250 | static bool atkbd_skip_deactivate; | ||
251 | |||
246 | static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, | 252 | static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, |
247 | ssize_t (*handler)(struct atkbd *, char *)); | 253 | ssize_t (*handler)(struct atkbd *, char *)); |
248 | static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count, | 254 | static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count, |
@@ -768,7 +774,8 @@ static int atkbd_probe(struct atkbd *atkbd) | |||
768 | * Make sure nothing is coming from the keyboard and disturbs our | 774 | * Make sure nothing is coming from the keyboard and disturbs our |
769 | * internal state. | 775 | * internal state. |
770 | */ | 776 | */ |
771 | atkbd_deactivate(atkbd); | 777 | if (!atkbd_skip_deactivate) |
778 | atkbd_deactivate(atkbd); | ||
772 | 779 | ||
773 | return 0; | 780 | return 0; |
774 | } | 781 | } |
@@ -1638,6 +1645,12 @@ static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id) | |||
1638 | return 1; | 1645 | return 1; |
1639 | } | 1646 | } |
1640 | 1647 | ||
1648 | static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id) | ||
1649 | { | ||
1650 | atkbd_skip_deactivate = true; | ||
1651 | return 1; | ||
1652 | } | ||
1653 | |||
1641 | static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { | 1654 | static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { |
1642 | { | 1655 | { |
1643 | .matches = { | 1656 | .matches = { |
@@ -1775,6 +1788,20 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { | |||
1775 | .callback = atkbd_setup_scancode_fixup, | 1788 | .callback = atkbd_setup_scancode_fixup, |
1776 | .driver_data = atkbd_oqo_01plus_scancode_fixup, | 1789 | .driver_data = atkbd_oqo_01plus_scancode_fixup, |
1777 | }, | 1790 | }, |
1791 | { | ||
1792 | .matches = { | ||
1793 | DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), | ||
1794 | DMI_MATCH(DMI_PRODUCT_NAME, "LW25-B7HV"), | ||
1795 | }, | ||
1796 | .callback = atkbd_deactivate_fixup, | ||
1797 | }, | ||
1798 | { | ||
1799 | .matches = { | ||
1800 | DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), | ||
1801 | DMI_MATCH(DMI_PRODUCT_NAME, "P1-J273B"), | ||
1802 | }, | ||
1803 | .callback = atkbd_deactivate_fixup, | ||
1804 | }, | ||
1778 | { } | 1805 | { } |
1779 | }; | 1806 | }; |
1780 | 1807 | ||
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 55c15304ddbc..4e491c1762cf 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c | |||
@@ -392,6 +392,13 @@ static const struct of_device_id tca8418_dt_ids[] = { | |||
392 | { } | 392 | { } |
393 | }; | 393 | }; |
394 | MODULE_DEVICE_TABLE(of, tca8418_dt_ids); | 394 | MODULE_DEVICE_TABLE(of, tca8418_dt_ids); |
395 | |||
396 | /* | ||
397 | * The device tree based i2c loader looks for | ||
398 | * "i2c:" + second_component_of(property("compatible")) | ||
399 | * and therefore we need an alias to be found. | ||
400 | */ | ||
401 | MODULE_ALIAS("i2c:tca8418"); | ||
395 | #endif | 402 | #endif |
396 | 403 | ||
397 | static struct i2c_driver tca8418_keypad_driver = { | 404 | static struct i2c_driver tca8418_keypad_driver = { |