Message ID | 20170217134052.440-1-drake@endlessm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Feb 17 2017 or thereabouts, Daniel Drake wrote: > Add support for media keys on the keyboard that comes with the > Asus V221ID and ZN241IC All In One computers. > > The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. > > This device is not visibly branded as Chicony, and the USB Vendor ID > suggests that it is a JESS device. However this seems like the right place > to put it: the usage codes are identical to the currently supported > devices, and this driver already supports the ASUS AIO keyboard AK1D. Except that the AK1D is branded as Chicony. So I think it will confuse users to ask them to load hid-chicony on a Asus keyboard branded as JESS. How about adding this one to hid-asus directly (with maybe a guard against either the PID or a quirk for it)? Cheers, Benjamin > > Signed-off-by: Daniel Drake <drake@endlessm.com> > --- > drivers/hid/Kconfig | 4 ++-- > drivers/hid/hid-chicony.c | 1 + > drivers/hid/hid-core.c | 1 + > drivers/hid/hid-ids.h | 1 + > 4 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig > index 1aeb80e..8eab320 100644 > --- a/drivers/hid/Kconfig > +++ b/drivers/hid/Kconfig > @@ -175,11 +175,11 @@ config HID_CHERRY > Support for Cherry Cymotion keyboard. > > config HID_CHICONY > - tristate "Chicony Tactical pad" > + tristate "Chicony devices" > depends on HID > default !EXPERT > ---help--- > - Support for Chicony Tactical pad. > + Support for Chicony Tactical pad and special keys on Chicony keyboards. > > config HID_CORSAIR > tristate "Corsair devices" > diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c > index bc3cec1..f04ed9a 100644 > --- a/drivers/hid/hid-chicony.c > +++ b/drivers/hid/hid-chicony.c > @@ -86,6 +86,7 @@ static const struct hid_device_id ch_devices[] = { > { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) }, > { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) }, > { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) }, > + { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_ZEN_AIO_KBD) }, > { } > }; > MODULE_DEVICE_TABLE(hid, ch_devices); > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > index 538ff69..405819d 100644 > --- a/drivers/hid/hid-core.c > +++ b/drivers/hid/hid-core.c > @@ -1909,6 +1909,7 @@ static const struct hid_device_id hid_have_special_driver[] = { > { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, > { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) }, > { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) }, > + { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_ZEN_AIO_KBD) }, > { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, > { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, > { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h > index 86c95d3..b3df60d 100644 > --- a/drivers/hid/hid-ids.h > +++ b/drivers/hid/hid-ids.h > @@ -557,6 +557,7 @@ > > #define USB_VENDOR_ID_JESS 0x0c45 > #define USB_DEVICE_ID_JESS_YUREX 0x1010 > +#define USB_DEVICE_ID_JESS_ZEN_AIO_KBD 0x5112 > > #define USB_VENDOR_ID_JESS2 0x0f30 > #define USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD 0x0111 > -- > 2.9.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 17 Feb 2017, Daniel Drake wrote: > Add support for media keys on the keyboard that comes with the > Asus V221ID and ZN241IC All In One computers. > > The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. > > This device is not visibly branded as Chicony, and the USB Vendor ID > suggests that it is a JESS device. However this seems like the right place > to put it: the usage codes are identical to the currently supported > devices, and this driver already supports the ASUS AIO keyboard AK1D. > > Signed-off-by: Daniel Drake <drake@endlessm.com> Applied to for-4.11/upstream-fixes. Thanks,
Hi Benjamin, I see this was applied by Jiri before I had a chance to update it based on your feedback. On Wed, Mar 1, 2017 at 11:15 AM, Benjamin Tissoires <benjamin.tissoires@redhat.com> wrote: > On Feb 17 2017 or thereabouts, Daniel Drake wrote: >> Add support for media keys on the keyboard that comes with the >> Asus V221ID and ZN241IC All In One computers. >> >> The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. >> >> This device is not visibly branded as Chicony, and the USB Vendor ID >> suggests that it is a JESS device. However this seems like the right place >> to put it: the usage codes are identical to the currently supported >> devices, and this driver already supports the ASUS AIO keyboard AK1D. > > Except that the AK1D is branded as Chicony. So I think it will confuse > users to ask them to load hid-chicony on a Asus keyboard branded as > JESS. > > How about adding this one to hid-asus directly (with maybe a guard > against either the PID or a quirk for it)? Indeed the new keyboard added here is not branded as Chicony nor Jess, but only as Asus. We additionally now have another keyboard that needs the same key handling, again only branded as Asus, but this time the USB ID is 0x062a:0x5110 suggesting manufacturer TURBOX. I am assuming you'd prefer that we have both of these keyboards handled by hid-asus instead of hid-chicony even that would duplicate a bit of code. But is it really necessary to quirk it based on PID, can't we just check for (usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR like hid-chicony does? Thanks Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 23 Mar 2017, Daniel Drake wrote: > I see this was applied by Jiri before I had a chance to update it > based on your feedback. I got a bit lost about what is branded in which way ... but if you figure out a better driver that should be binding to the device in order to make the user experience better, just please send me a followup patch that'd move things around. Thanks,
Hi Benjamin, Trying to pick this up again. On Thu, Mar 23, 2017 at 1:00 PM, Daniel Drake <drake@endlessm.com> wrote: > On Wed, Mar 1, 2017 at 11:15 AM, Benjamin Tissoires > <benjamin.tissoires@redhat.com> wrote: >> On Feb 17 2017 or thereabouts, Daniel Drake wrote: >>> This device is not visibly branded as Chicony, and the USB Vendor ID >>> suggests that it is a JESS device. However this seems like the right place >>> to put it: the usage codes are identical to the currently supported >>> devices, and this driver already supports the ASUS AIO keyboard AK1D. >> >> Except that the AK1D is branded as Chicony. So I think it will confuse >> users to ask them to load hid-chicony on a Asus keyboard branded as >> JESS. >> >> How about adding this one to hid-asus directly (with maybe a guard >> against either the PID or a quirk for it)? > > Indeed the new keyboard added here is not branded as Chicony nor Jess, > but only as Asus. > > We additionally now have another keyboard that needs the same key > handling, again only branded as Asus, but this time the USB ID is > 0x062a:0x5110 suggesting manufacturer TURBOX. > > I am assuming you'd prefer that we have both of these keyboards > handled by hid-asus instead of hid-chicony even that would duplicate a > bit of code. But is it really necessary to quirk it based on PID, > can't we just check for (usage->hid & HID_USAGE_PAGE) == > HID_UP_MSVENDOR like hid-chicony does? I'm going to assume that following hid-chicony here (just check the usage page) is enough. What I'm now curious about, looking closer, is whether we should move the original hid-chicony Asus AK1D support to hid-asus too. You mentioned that this keyboard is physically branded as Chicony, but are you sure? This is not mentioned in the commit message, nor in the original bug link, nor in the patch submission discussion. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1027789 http://www.spinics.net/lists/linux-input/msg21670.html And google image search brings up results for both the top and bottom of this keyboard, and no sign of any Chicony branding. https://www.google.com/search?q=asus+AK1D&source=lnms&tbm=isch So should I move AK1D support to hid-asus too, to match the physical branding? Thanks Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 1aeb80e..8eab320 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -175,11 +175,11 @@ config HID_CHERRY Support for Cherry Cymotion keyboard. config HID_CHICONY - tristate "Chicony Tactical pad" + tristate "Chicony devices" depends on HID default !EXPERT ---help--- - Support for Chicony Tactical pad. + Support for Chicony Tactical pad and special keys on Chicony keyboards. config HID_CORSAIR tristate "Corsair devices" diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c index bc3cec1..f04ed9a 100644 --- a/drivers/hid/hid-chicony.c +++ b/drivers/hid/hid-chicony.c @@ -86,6 +86,7 @@ static const struct hid_device_id ch_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) }, + { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_ZEN_AIO_KBD) }, { } }; MODULE_DEVICE_TABLE(hid, ch_devices); diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 538ff69..405819d 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1909,6 +1909,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) }, { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) }, + { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_ZEN_AIO_KBD) }, { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 86c95d3..b3df60d 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -557,6 +557,7 @@ #define USB_VENDOR_ID_JESS 0x0c45 #define USB_DEVICE_ID_JESS_YUREX 0x1010 +#define USB_DEVICE_ID_JESS_ZEN_AIO_KBD 0x5112 #define USB_VENDOR_ID_JESS2 0x0f30 #define USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD 0x0111
Add support for media keys on the keyboard that comes with the Asus V221ID and ZN241IC All In One computers. The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. This device is not visibly branded as Chicony, and the USB Vendor ID suggests that it is a JESS device. However this seems like the right place to put it: the usage codes are identical to the currently supported devices, and this driver already supports the ASUS AIO keyboard AK1D. Signed-off-by: Daniel Drake <drake@endlessm.com> --- drivers/hid/Kconfig | 4 ++-- drivers/hid/hid-chicony.c | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-)