From: mchehab@infradead.org <mchehab@infradead.org> Date: Fri, 7 Nov 2008 19:28:39 -0200 Subject: [usb] add HID_QUIRK_RESET_LEDS to some keyboards Message-id: 20081107192839.196a5cc3@pedra.chehab.org O-Subject: [PATCH RHEL5.3] add HID_QUIRK_RESET_LEDS to some keyboards Bugzilla: 434538 RH-Acked-by: Aristeu Rozanski <aris@redhat.com> RH-Acked-by: Brian Maly <bmaly@redhat.com> RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com> This patch adds a quirk to a few keyboards to fix their LED It addresses BZ434538 Backport the following upstream patches: commit a48c65b35a6f993aec13d18a37f6ea71fbcb0c06 commit 0dc491682f6e673a14c643d9a3e7305ce4616b96 commit 3c5f4b25f3552c9bcb52eb956753a3c8140480b7 Some keyboards need to reset LED lights when plugged or recovered from hibernation, otherwise, NUM LOCK light will have the initial state of ON, even if NUM LOCK is turned off. This patch adds support for some of those repported keyboards. Tested locally with DELL SK8115(413c:2105) and with Bright ABNT2 (1241:1503). Also backported upstream changes for Logitech Keyboard (046d:c311). Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 73a9310..eeadf76 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -1635,6 +1635,13 @@ static void hid_set_leds(struct hid_device *hid) #define USB_VENDOR_ID_DELL 0x413c #define USB_DEVICE_ID_DELL_W7658 0x2005 +#define USB_DEVICE_ID_DELL_SK8115 0x2105 + +#define USB_VENDOR_ID_BRIGHT 0x1241 +#define USB_DEVICE_ID_BRIGHT_ABNT2 0x1503 + +#define USB_VENDOR_ID_LOGITECH 0x046d +#define USB_DEVICE_ID_LOGITECH_KBD 0xc311 /* * Alphabetically sorted blacklist by quirk type. @@ -1794,7 +1801,10 @@ static const struct hid_blacklist { { USB_VENDOR_ID_PANJIT, 0x0003, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_BRIGHT, USB_DEVICE_ID_BRIGHT_ABNT2, HID_QUIRK_RESET_LEDS }, { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS }, + { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115, HID_QUIRK_RESET_LEDS }, + { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS }, { 0, 0 } };