The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] appletouch: use canonical names instead of raw USB IDs
@ 2006-11-14 17:22 Julien BLACHE
  2006-11-14 17:45 ` Stelian Pop
  0 siblings, 1 reply; 3+ messages in thread
From: Julien BLACHE @ 2006-11-14 17:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: dmitry.torokhov, stelian

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

Hi,

Small readability improvement for appletouch: use canonical names
instead of raw USB IDs for some of the devices.

Signed-off-by: Julien BLACHE <jb@jblache.org>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: appletouch: use canonical names instead of raw USD IDs for some devices --]
[-- Type: text/x-patch, Size: 1461 bytes --]

--- appletouch.c.orig	2006-11-14 18:14:30.619405923 +0100
+++ appletouch.c	2006-11-14 18:18:14.612170544 +0100
@@ -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) },

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]


JB.

-- 
Julien BLACHE                                   <http://www.jblache.org> 
<jb@jblache.org>                                  GPG KeyID 0xF5D65169

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] appletouch: use canonical names instead of raw USB IDs
  2006-11-14 17:22 [PATCH] appletouch: use canonical names instead of raw USB IDs Julien BLACHE
@ 2006-11-14 17:45 ` Stelian Pop
  2006-11-14 19:15   ` [PATCH] hid-core: canonical defines for Apple USB device IDs Julien BLACHE
  0 siblings, 1 reply; 3+ messages in thread
From: Stelian Pop @ 2006-11-14 17:45 UTC (permalink / raw)
  To: Julien BLACHE; +Cc: linux-kernel, dmitry.torokhov

Le mardi 14 novembre 2006 à 18:22 +0100, Julien BLACHE a écrit :
> 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
	Acked-by: Stelian Pop <stelian@popies.net>
for the both patches.

Oh, and put your patch in the mail inline, it's easier to quote if
needed.

Stelian.
-- 
Stelian Pop <stelian@popies.net>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] hid-core: canonical defines for Apple USB device IDs
  2006-11-14 17:45 ` Stelian Pop
@ 2006-11-14 19:15   ` Julien BLACHE
  0 siblings, 0 replies; 3+ messages in thread
From: Julien BLACHE @ 2006-11-14 19:15 UTC (permalink / raw)
  To: Stelian Pop; +Cc: linux-kernel, dmitry.torokhov

Stelian Pop <stelian@popies.net> wrote:

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.

Here it is.

Use canonical defines for the Apple USB device IDs.
Also add the Geyser IV devices missing in my previous patch.

Signed-off-by: Julien BLACHE <jb@jblache.org>

--- linux-2.6.19-rc5/drivers/usb/input/hid-core.c.orig	2006-11-14 20:06:54.523719128 +0100
+++ linux-2.6.19-rc5/drivers/usb/input/hid-core.c	2006-11-14 19:43:18.050998948 +0100
@@ -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 },


> 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.

-- 
Julien BLACHE                                   <http://www.jblache.org> 
<jb@jblache.org>                                  GPG KeyID 0xF5D65169

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-14 19:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14 17:22 [PATCH] appletouch: use canonical names instead of raw USB IDs Julien BLACHE
2006-11-14 17:45 ` Stelian Pop
2006-11-14 19:15   ` [PATCH] hid-core: canonical defines for Apple USB device IDs Julien BLACHE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox