Skip to contentSkip to conversation

appletouch driver and 4th generation macbooks

PATCH In review Tobias Müller 3 participants 8 messages Mar 14, 2008 – Apr 3, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 appletouch driver and 4th generation macbooks

Hello!

Adds product ids for 4th generation MacBooks in appletouch driver.

drivers/input/mouse/appletouch.c +0 -0
index b4423a4..8dd3942 100644
@@ -62,6 +62,10 @@

#define GEYSER4_ISO_PRODUCT_ID 0x021B
#define GEYSER4_JIS_PRODUCT_ID 0x021C

+#define GEYSER4_HF_ANSI_PRODUCT_ID     0x0229
+#define GEYSER4_HF_ISO_PRODUCT_ID      0x022A
+#define GEYSER4_HF_JIS_PRODUCT_ID      0x022B
+
#define ATP_DEVICE(prod)                                       \
       .match_flags = USB_DEVICE_ID_MATCH_DEVICE |             \
                      USB_DEVICE_ID_MATCH_INT_CLASS |          \
@@ -93,6 +97,10 @@ static struct usb_device_id atp_table [] = {
       { ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) },
       { ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) },
+       { ATP_DEVICE(GEYSER4_HF_ANSI_PRODUCT_ID) },
+       { ATP_DEVICE(GEYSER4_HF_ISO_PRODUCT_ID) },
+       { ATP_DEVICE(GEYSER4_HF_JIS_PRODUCT_ID) },
+
       /* Terminating entry */
       { }
};
@@ -217,7 +225,10 @@ static inline int atp_is_geyser_3(struct atp *dev)
               (productId == GEYSER3_JIS_PRODUCT_ID) ||
               (productId == GEYSER4_ANSI_PRODUCT_ID) ||
               (productId == GEYSER4_ISO_PRODUCT_ID) ||
-               (productId == GEYSER4_JIS_PRODUCT_ID);
+               (productId == GEYSER4_JIS_PRODUCT_ID) ||
+               (productId == GEYSER4_HF_ANSI_PRODUCT_ID) ||
+               (productId == GEYSER4_HF_ISO_PRODUCT_ID) ||
+               (productId == GEYSER4_HF_JIS_PRODUCT_ID);

}

Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines

Adds product ids for 4th generation MacBooks in appletouch driver.

Looks good.

Quoted 1 line

Review

Quoted 3 lines
(quoted diff) +3 -0
+#define GEYSER4_HF_ANSI_PRODUCT_ID     0x0229
+#define GEYSER4_HF_ISO_PRODUCT_ID      0x022A
+#define GEYSER4_HF_JIS_PRODUCT_ID      0x022B

Any hint why the "HF"? Also, are you working on getting the rest of the input stuff working, especially the keyboard FN key translations? You can have below patch I made for my brother but never pushed upstream. Might not apply against a current kernel any more.

johannes

From: Johannes Berg <[email protected]>

Preliminary support for new macbook input devices (keyboard/touchpad)

---
Diffed against 2.6.24-rc6.

 hid/hid-input.c          |   50 +++++++++++++++++++++++++++++++++++++++++++----
 hid/usbhid/hid-quirks.c  |    2 +
 input/mouse/appletouch.c |   11 +++++++++-
 3 files changed, 58 insertions(+), 5 deletions(-)
drivers/input/mouse/appletouch.c +10 -1
Index: linux-2.6.24-rc6/drivers/input/mouse/appletouch.c
===================================================================
@@ -62,6 +62,11 @@
 #define GEYSER4_ISO_PRODUCT_ID	0x021B
 #define GEYSER4_JIS_PRODUCT_ID	0x021C
 
+/*
+ * Geyser IV.1 (no difference to IV known so far)
+ */
+#define GEYSER4_1_ISO_PRODUCT_ID	0x022a
+
 #define ATP_DEVICE(prod)					\
 	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |		\
 		       USB_DEVICE_ID_MATCH_INT_CLASS |		\
@@ -93,6 +98,9 @@
 	{ ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) },
 	{ ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) },
 
+	/* Core2 Duo MacBook (late 2007 version) */
+	{ ATP_DEVICE(GEYSER4_1_ISO_PRODUCT_ID) },
+
 	/* Terminating entry */
 	{ }
 };
@@ -217,7 +225,8 @@
 		(productId == GEYSER3_JIS_PRODUCT_ID) ||
 		(productId == GEYSER4_ANSI_PRODUCT_ID) ||
 		(productId == GEYSER4_ISO_PRODUCT_ID) ||
-		(productId == GEYSER4_JIS_PRODUCT_ID);
+		(productId == GEYSER4_JIS_PRODUCT_ID) ||
+		(productId == GEYSER4_1_ISO_PRODUCT_ID);
 }
 
 /*
drivers/hid/usbhid/hid-quirks.c +2 -0
Index: linux-2.6.24-rc6/drivers/hid/usbhid/hid-quirks.c
===================================================================
@@ -59,6 +59,7 @@
 #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_GEYSER4_1_ISO	0x022a
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
 #define USB_DEVICE_ID_APPLE_IRCONTROL4	0x8242
@@ -551,6 +552,7 @@
 	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
 	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
 	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_1_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
 	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
 	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
 
drivers/hid/hid-input.c +46 -4

83 lines not on this page · raw message

#2 lore raw

Hi

Quoted 1 line

Any hint why the "HF"?

No, i found this names from in a usb-quirks patch, when adjusting that one for 2.6.25.

Quoted 4 lines

Also, are you working on getting the rest of the
input stuff working, especially the keyboard FN key translations? You can have below patch I made for my brother but never pushed upstream. Might not apply against a current kernel any more.

This is already implemented in 2.6.25-rc5 :)

Regards
Tobias

#3 lore raw
Quoted 4 lines · Tobias Müller

Hi

Quoted 1 line

Any hint why the "HF"?

No, i found this names from in a usb-quirks patch, when adjusting that one for 2.6.25.

Oh ok.

Quoted 5 lines
Quoted 4 lines

Also, are you working on getting the rest of the
input stuff working, especially the keyboard FN key translations? You can have below patch I made for my brother but never pushed upstream. Might not apply against a current kernel any more.

This is already implemented in 2.6.25-rc5 :)

Oh cool :)

Thanks,
johannes

#5 lore raw
Quoted 5 lines · Tobias Müller

Hi,

Quoted 2 lines · Johannes Berg
Quoted 1 line

Adds product ids for 4th generation MacBooks in appletouch driver.

Quoted 7 lines
Quoted 5 lines

Looks good.

Quoted 1 line

I still cannot find the new device ids in 2.6.25-rc8. Is there anything to do further from my side?

I guess I was supposed to pick up the patch and thought somebody else would. Dmitry, can you pick it up into your input tree?

I don't expect it to be going into 2.6.25 at this point, it's rather close to being released. On the other hand, it's not like it can cause regressions, but I guess we need to draw a line at some point.

johannes

maintainer
#6 lore raw

Hi Johannes, Tobias,

Quoted 13 lines · Johannes Berg
Quoted 11 lines · Tobias M??ller

Hi,

Quoted 7 lines · Johannes Berg
Quoted 1 line

Adds product ids for 4th generation MacBooks in appletouch driver.

Looks good.

Quoted 1 line
Quoted 9 lines
Quoted 1 line

I still cannot find the new device ids in 2.6.25-rc8. Is there anything to do further from my side?

I guess I was supposed to pick up the patch and thought somebody else would. Dmitry, can you pick it up into your input tree?

I don't expect it to be going into 2.6.25 at this point, it's rather close to being released. On the other hand, it's not like it can cause regressions, but I guess we need to draw a line at some point.

I applied the patch to my tree. I will try to push the change to Linus before 2.6.25 since it is very low risk. Btw, is_geyser3() function is becoming unwieldy. We might consider changing it to something that scans array of integers instead of adding more conditions to that "if" statement next time we add more IDs to it.

Signature · 1 line
Dmitry
#7 lore raw

Hi Dmitry,

Quoted 2 lines

I applied the patch to my tree. I will try to push the change to Linus before 2.6.25 since it is very low risk.

Good, thanks.

Quoted 4 lines

Btw, is_geyser3() function
is becoming unwieldy. We might consider changing it to something that scans array of integers instead of adding more conditions to that "if" statement next time we add more IDs to it.

Yeah, good point. I'll try to remember when the next person comes around :)

johannes