]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Input: atkbd - add keyboard quirk for HP Pavilion ZV6100 laptop
authorRikard Ljungstrand <lrikard@student.chalmers.se>
Sat, 20 Dec 2008 02:59:20 +0000 (21:59 -0500)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 20 Dec 2008 09:56:37 +0000 (04:56 -0500)
Add quirk for misbehaving volume buttons on HP Pavilion ZV6100 laptop which
are not sending keyrelease events, as reported by Aaron Pickett.

Signed-off-by: Rikard Ljungstrand <lrikard@student.chalmers.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/keyboard/atkbd.c

index 379b7ff354ec7ba0036d3e1d1072b51eac61f1c3..fa6ed339d171ec33ff421d48b2069c2969613fe1 100644 (file)
@@ -883,6 +883,23 @@ static void atkbd_inventec_keymap_fixup(struct atkbd *atkbd)
                                  atkbd->force_release_mask);
 }
 
+/*
+ * Perform fixup for HP Pavilion ZV6100 laptop that doesn't generate release
+ * for its volume buttons
+ */
+static void atkbd_hp_zv6100_keymap_fixup(struct atkbd *atkbd)
+{
+       const unsigned int forced_release_keys[] = {
+               0xae, 0xb0,
+       };
+       int i;
+
+       if (atkbd->set == 2)
+               for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+                       __set_bit(forced_release_keys[i],
+                                       atkbd->force_release_mask);
+}
+
 /*
  * atkbd_set_keycode_table() initializes keyboard's keycode table
  * according to the selected scancode set
@@ -1484,6 +1501,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
                .callback = atkbd_setup_fixup,
                .driver_data = atkbd_hp_keymap_fixup,
        },
+       {
+               .ident = "HP Pavilion ZV6100",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion ZV6100"),
+               },
+               .callback = atkbd_setup_fixup,
+               .driver_data = atkbd_hp_zv6100_keymap_fixup,
+       },
        {
                .ident = "Inventec Symphony",
                .matches = {