diff options
Diffstat (limited to 'drivers/usb/input/appletouch.c')
-rw-r--r-- | drivers/usb/input/appletouch.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 4825db4b2566..69c445620f15 100644 --- a/drivers/usb/input/appletouch.c +++ b/drivers/usb/input/appletouch.c | |||
@@ -47,6 +47,14 @@ | |||
47 | #define GEYSER3_ISO_PRODUCT_ID 0x0218 | 47 | #define GEYSER3_ISO_PRODUCT_ID 0x0218 |
48 | #define GEYSER3_JIS_PRODUCT_ID 0x0219 | 48 | #define GEYSER3_JIS_PRODUCT_ID 0x0219 |
49 | 49 | ||
50 | /* | ||
51 | * Geyser IV: same as Geyser III according to Info.plist in AppleUSBTrackpad.kext | ||
52 | * -> same IOClass (AppleUSBGrIIITrackpad), same acceleration tables | ||
53 | */ | ||
54 | #define GEYSER4_ANSI_PRODUCT_ID 0x021A | ||
55 | #define GEYSER4_ISO_PRODUCT_ID 0x021B | ||
56 | #define GEYSER4_JIS_PRODUCT_ID 0x021C | ||
57 | |||
50 | #define ATP_DEVICE(prod) \ | 58 | #define ATP_DEVICE(prod) \ |
51 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ | 59 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ |
52 | USB_DEVICE_ID_MATCH_INT_CLASS | \ | 60 | USB_DEVICE_ID_MATCH_INT_CLASS | \ |
@@ -68,10 +76,16 @@ static struct usb_device_id atp_table [] = { | |||
68 | { ATP_DEVICE(GEYSER_ISO_PRODUCT_ID) }, | 76 | { ATP_DEVICE(GEYSER_ISO_PRODUCT_ID) }, |
69 | { ATP_DEVICE(GEYSER_JIS_PRODUCT_ID) }, | 77 | { ATP_DEVICE(GEYSER_JIS_PRODUCT_ID) }, |
70 | 78 | ||
79 | /* Core Duo MacBook & MacBook Pro */ | ||
71 | { ATP_DEVICE(GEYSER3_ANSI_PRODUCT_ID) }, | 80 | { ATP_DEVICE(GEYSER3_ANSI_PRODUCT_ID) }, |
72 | { ATP_DEVICE(GEYSER3_ISO_PRODUCT_ID) }, | 81 | { ATP_DEVICE(GEYSER3_ISO_PRODUCT_ID) }, |
73 | { ATP_DEVICE(GEYSER3_JIS_PRODUCT_ID) }, | 82 | { ATP_DEVICE(GEYSER3_JIS_PRODUCT_ID) }, |
74 | 83 | ||
84 | /* Core2 Duo MacBook & MacBook Pro */ | ||
85 | { ATP_DEVICE(GEYSER4_ANSI_PRODUCT_ID) }, | ||
86 | { ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) }, | ||
87 | { ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) }, | ||
88 | |||
75 | /* Terminating entry */ | 89 | /* Terminating entry */ |
76 | { } | 90 | { } |
77 | }; | 91 | }; |
@@ -108,7 +122,7 @@ MODULE_DEVICE_TABLE (usb, atp_table); | |||
108 | */ | 122 | */ |
109 | #define ATP_THRESHOLD 5 | 123 | #define ATP_THRESHOLD 5 |
110 | 124 | ||
111 | /* MacBook Pro (Geyser 3) initialization constants */ | 125 | /* MacBook Pro (Geyser 3 & 4) initialization constants */ |
112 | #define ATP_GEYSER3_MODE_READ_REQUEST_ID 1 | 126 | #define ATP_GEYSER3_MODE_READ_REQUEST_ID 1 |
113 | #define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9 | 127 | #define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9 |
114 | #define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300 | 128 | #define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300 |
@@ -181,7 +195,10 @@ static inline int atp_is_geyser_3(struct atp *dev) | |||
181 | 195 | ||
182 | return (productId == GEYSER3_ANSI_PRODUCT_ID) || | 196 | return (productId == GEYSER3_ANSI_PRODUCT_ID) || |
183 | (productId == GEYSER3_ISO_PRODUCT_ID) || | 197 | (productId == GEYSER3_ISO_PRODUCT_ID) || |
184 | (productId == GEYSER3_JIS_PRODUCT_ID); | 198 | (productId == GEYSER3_JIS_PRODUCT_ID) || |
199 | (productId == GEYSER4_ANSI_PRODUCT_ID) || | ||
200 | (productId == GEYSER4_ISO_PRODUCT_ID) || | ||
201 | (productId == GEYSER4_JIS_PRODUCT_ID); | ||
185 | } | 202 | } |
186 | 203 | ||
187 | static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, | 204 | static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, |