diff options
author | Jiri Kosina <jkosina@suse.cz> | 2008-06-26 10:46:38 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-06-30 09:37:40 -0400 |
commit | 5a54c0115757fd98ca05efae626e6aebf54a8427 (patch) | |
tree | d23b1b1d651fa609b0940bfb214dcf0195c5915e /drivers | |
parent | 3cadd2d98972f806165c634553ac4918b2b7920c (diff) |
Input: atkbd - fix HP 2133 not sending release event for video switch
Video switch key on HP 2133 doesn't send release event, so we
have to create workaround similar to what we do for Dell Latitude,
i.e. perform DMI match for the system and generate 'false' release
event ourselves, so that userspace doesn't think that the key is
stuck forever.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index c27537be82ae..b1ce10f50bcf 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -851,6 +851,23 @@ static void atkbd_latitude_keymap_fixup(struct atkbd *atkbd) | |||
851 | } | 851 | } |
852 | 852 | ||
853 | /* | 853 | /* |
854 | * Perform fixup for HP system that doesn't generate release | ||
855 | * for its video switch | ||
856 | */ | ||
857 | static void atkbd_hp_keymap_fixup(struct atkbd *atkbd) | ||
858 | { | ||
859 | const unsigned int forced_release_keys[] = { | ||
860 | 0x94, | ||
861 | }; | ||
862 | int i; | ||
863 | |||
864 | if (atkbd->set == 2) | ||
865 | for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++) | ||
866 | __set_bit(forced_release_keys[i], | ||
867 | atkbd->force_release_mask); | ||
868 | } | ||
869 | |||
870 | /* | ||
854 | * atkbd_set_keycode_table() initializes keyboard's keycode table | 871 | * atkbd_set_keycode_table() initializes keyboard's keycode table |
855 | * according to the selected scancode set | 872 | * according to the selected scancode set |
856 | */ | 873 | */ |
@@ -1452,6 +1469,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1452 | .callback = atkbd_setup_fixup, | 1469 | .callback = atkbd_setup_fixup, |
1453 | .driver_data = atkbd_latitude_keymap_fixup, | 1470 | .driver_data = atkbd_latitude_keymap_fixup, |
1454 | }, | 1471 | }, |
1472 | { | ||
1473 | .ident = "HP 2133", | ||
1474 | .matches = { | ||
1475 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
1476 | DMI_MATCH(DMI_PRODUCT_NAME, "HP 2133"), | ||
1477 | }, | ||
1478 | .callback = atkbd_setup_fixup, | ||
1479 | .driver_data = atkbd_hp_keymap_fixup, | ||
1480 | }, | ||
1455 | { } | 1481 | { } |
1456 | }; | 1482 | }; |
1457 | 1483 | ||