appletouch: use canonical names instead of raw USB IDs
PATCH 1/1 appletouch: use canonical names instead of raw USB IDs
Hi,
Small readability improvement for appletouch: use canonical names instead of raw USB IDs for some of the devices.
appletouch.c renamed from appletouch.c.orig +17 -10
@@ -38,14 +38,21 @@#define APPLE_VENDOR_ID 0x05AC/* These names come from Info.plist in AppleUSBTrackpad.kext */ -#define GEYSER_ANSI_PRODUCT_ID 0x0214 -#define GEYSER_ISO_PRODUCT_ID 0x0215 -#define GEYSER_JIS_PRODUCT_ID 0x0216 +#define FOUNTAIN_ANSI_PRODUCT_ID 0x020E +#define FOUNTAIN_ISO_PRODUCT_ID 0x020F + +#define FOUNTAIN_TP_ONLY_PRODUCT_ID 0x030A + +#define GEYSER1_TP_ONLY_PRODUCT_ID 0x030B + +#define GEYSER_ANSI_PRODUCT_ID 0x0214 +#define GEYSER_ISO_PRODUCT_ID 0x0215 +#define GEYSER_JIS_PRODUCT_ID 0x0216/* MacBook devices */ -#define GEYSER3_ANSI_PRODUCT_ID 0x0217 -#define GEYSER3_ISO_PRODUCT_ID 0x0218 -#define GEYSER3_JIS_PRODUCT_ID 0x0219 +#define GEYSER3_ANSI_PRODUCT_ID 0x0217 +#define GEYSER3_ISO_PRODUCT_ID 0x0218 +#define GEYSER3_JIS_PRODUCT_ID 0x0219#define ATP_DEVICE (prod) \ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
@@ -58,10 +65,10 @@/* table of devices that work with this driver */ static struct usb_device_id atp_table [] = { - {ATP_DEVICE (0x020E ) }, - {ATP_DEVICE (0x020F ) }, - {ATP_DEVICE (0x030A ) }, - {ATP_DEVICE (0x030B ) }, + {ATP_DEVICE (FOUNTAIN_ANSI_PRODUCT_ID ) }, + {ATP_DEVICE (FOUNTAIN_ISO_PRODUCT_ID ) }, + {ATP_DEVICE (FOUNTAIN_TP_ONLY_PRODUCT_ID ) }, + {ATP_DEVICE (GEYSER1_TP_ONLY_PRODUCT_ID ) },/* PowerBooks Oct 2005 */ {ATP_DEVICE (GEYSER_ANSI_PRODUCT_ID ) },
JB.
Signature · 2 lines
Julien BLACHE <http://www.jblache.org> <[email protected]> GPG KeyID 0xF5D65169
Quoted 4 lines · Julien BLACHE
Hi,
Small readability improvement for appletouch: use canonical names instead of raw USB IDs for some of the devices.
While you're at it, please update hid-core.c too for the FN_KEY quirks.
The same comments applies to your other patch which adds the new Geyser IV ids. Those needs to be added to hid-core.c too.
Otherwise you have my
for the both patches.
Oh, and put your patch in the mail inline, it's easier to quote if needed.
Stelian.
Signature · 1 line
Stelian Pop <[email protected]>
PATCH 1/1 hid-core: canonical defines for Apple USB device IDs
Stelian Pop <[email protected]> wrote:
Hi,
Quoted 7 lines
Quoted 2 lines
Small readability improvement for appletouch: use canonical names instead of raw USB IDs for some of the devices.
While you're at it, please update
hid-core.ctoo for theFN_KEYquirks.The same comments applies to your other patch which adds the new Geyser IV ids. Those needs to be added to
hid-core.ctoo.
Here it is.
Use canonical defines for the Apple USB device IDs. Also add the Geyser IV devices missing in my previous patch.
drivers/usb/input/hid-core.c renamed from drivers/usb/input/hid-core.c.orig +26 -11
@@ -1627,6 +1627,19 @@#define USB_VENDOR_ID_APPLE 0x05ac#define USB_DEVICE_ID_APPLE_MIGHTYMOUSE 0x0304 +#define USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI 0x020e +#define USB_DEVICE_ID_APPLE_FOUNTAIN_ISO 0x020f +#define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214 +#define USB_DEVICE_ID_APPLE_GEYSER_ISO 0x0215 +#define USB_DEVICE_ID_APPLE_GEYSER_JIS 0x0216 +#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI 0x0217 +#define USB_DEVICE_ID_APPLE_GEYSER3_ISO 0x0218 +#define USB_DEVICE_ID_APPLE_GEYSER3_JIS 0x0219 +#define USB_DEVICE_ID_APPLE_GEYSER4_ANSI 0x021a +#define USB_DEVICE_ID_APPLE_GEYSER4_ISO 0x021b +#define USB_DEVICE_ID_APPLE_GEYSER4_JIS 0x021c +#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a +#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b#define USB_VENDOR_ID_CHERRY 0x046a#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023
@@ -1794,17 +1807,19 @@ { USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION }, - { USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x021B, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN }, { USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
Quoted 2 lines
Oh, and put your patch in the mail inline, it's easier to quote if needed.
MIME-inline obviously isn't good enough :/ Sorry for that.
JB.
Signature · 2 lines
Julien BLACHE <http://www.jblache.org> <[email protected]> GPG KeyID 0xF5D65169