diff options
| -rw-r--r-- | drivers/hid/hid-sony.c | 91 |
1 files changed, 90 insertions, 1 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index af02139b0b93..ed2f008f8403 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
| @@ -248,6 +248,88 @@ static __u8 motion_rdesc[] = { | |||
| 248 | 0xC0 /* End Collection */ | 248 | 0xC0 /* End Collection */ |
| 249 | }; | 249 | }; |
| 250 | 250 | ||
| 251 | /* PS/3 Navigation controller */ | ||
| 252 | static __u8 navigation_rdesc[] = { | ||
| 253 | 0x05, 0x01, /* Usage Page (Desktop), */ | ||
| 254 | 0x09, 0x04, /* Usage (Joystik), */ | ||
| 255 | 0xA1, 0x01, /* Collection (Application), */ | ||
| 256 | 0xA1, 0x02, /* Collection (Logical), */ | ||
| 257 | 0x85, 0x01, /* Report ID (1), */ | ||
| 258 | 0x75, 0x08, /* Report Size (8), */ | ||
| 259 | 0x95, 0x01, /* Report Count (1), */ | ||
| 260 | 0x15, 0x00, /* Logical Minimum (0), */ | ||
| 261 | 0x26, 0xFF, 0x00, /* Logical Maximum (255), */ | ||
| 262 | 0x81, 0x03, /* Input (Constant, Variable), */ | ||
| 263 | 0x75, 0x01, /* Report Size (1), */ | ||
| 264 | 0x95, 0x13, /* Report Count (19), */ | ||
| 265 | 0x15, 0x00, /* Logical Minimum (0), */ | ||
| 266 | 0x25, 0x01, /* Logical Maximum (1), */ | ||
| 267 | 0x35, 0x00, /* Physical Minimum (0), */ | ||
| 268 | 0x45, 0x01, /* Physical Maximum (1), */ | ||
| 269 | 0x05, 0x09, /* Usage Page (Button), */ | ||
| 270 | 0x19, 0x01, /* Usage Minimum (01h), */ | ||
| 271 | 0x29, 0x13, /* Usage Maximum (13h), */ | ||
| 272 | 0x81, 0x02, /* Input (Variable), */ | ||
| 273 | 0x75, 0x01, /* Report Size (1), */ | ||
| 274 | 0x95, 0x0D, /* Report Count (13), */ | ||
| 275 | 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ | ||
| 276 | 0x81, 0x03, /* Input (Constant, Variable), */ | ||
| 277 | 0x15, 0x00, /* Logical Minimum (0), */ | ||
| 278 | 0x26, 0xFF, 0x00, /* Logical Maximum (255), */ | ||
| 279 | 0x05, 0x01, /* Usage Page (Desktop), */ | ||
| 280 | 0x09, 0x01, /* Usage (Pointer), */ | ||
| 281 | 0xA1, 0x00, /* Collection (Physical), */ | ||
| 282 | 0x75, 0x08, /* Report Size (8), */ | ||
| 283 | 0x95, 0x02, /* Report Count (2), */ | ||
| 284 | 0x35, 0x00, /* Physical Minimum (0), */ | ||
| 285 | 0x46, 0xFF, 0x00, /* Physical Maximum (255), */ | ||
| 286 | 0x09, 0x30, /* Usage (X), */ | ||
| 287 | 0x09, 0x31, /* Usage (Y), */ | ||
| 288 | 0x81, 0x02, /* Input (Variable), */ | ||
| 289 | 0xC0, /* End Collection, */ | ||
| 290 | 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ | ||
| 291 | 0x95, 0x06, /* Report Count (6), */ | ||
| 292 | 0x81, 0x03, /* Input (Constant, Variable), */ | ||
| 293 | 0x05, 0x01, /* Usage Page (Desktop), */ | ||
| 294 | 0x75, 0x08, /* Report Size (8), */ | ||
| 295 | 0x95, 0x05, /* Report Count (5), */ | ||
| 296 | 0x09, 0x01, /* Usage (Pointer), */ | ||
| 297 | 0x81, 0x02, /* Input (Variable), */ | ||
| 298 | 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ | ||
| 299 | 0x95, 0x20, /* Report Count (26), */ | ||
| 300 | 0x81, 0x02, /* Input (Variable), */ | ||
| 301 | 0x75, 0x08, /* Report Size (8), */ | ||
| 302 | 0x95, 0x30, /* Report Count (48), */ | ||
| 303 | 0x09, 0x01, /* Usage (Pointer), */ | ||
| 304 | 0x91, 0x02, /* Output (Variable), */ | ||
| 305 | 0x75, 0x08, /* Report Size (8), */ | ||
| 306 | 0x95, 0x30, /* Report Count (48), */ | ||
| 307 | 0x09, 0x01, /* Usage (Pointer), */ | ||
| 308 | 0xB1, 0x02, /* Feature (Variable), */ | ||
| 309 | 0xC0, /* End Collection, */ | ||
| 310 | 0xA1, 0x02, /* Collection (Logical), */ | ||
| 311 | 0x85, 0x02, /* Report ID (2), */ | ||
| 312 | 0x75, 0x08, /* Report Size (8), */ | ||
| 313 | 0x95, 0x30, /* Report Count (48), */ | ||
| 314 | 0x09, 0x01, /* Usage (Pointer), */ | ||
| 315 | 0xB1, 0x02, /* Feature (Variable), */ | ||
| 316 | 0xC0, /* End Collection, */ | ||
| 317 | 0xA1, 0x02, /* Collection (Logical), */ | ||
| 318 | 0x85, 0xEE, /* Report ID (238), */ | ||
| 319 | 0x75, 0x08, /* Report Size (8), */ | ||
| 320 | 0x95, 0x30, /* Report Count (48), */ | ||
| 321 | 0x09, 0x01, /* Usage (Pointer), */ | ||
| 322 | 0xB1, 0x02, /* Feature (Variable), */ | ||
| 323 | 0xC0, /* End Collection, */ | ||
| 324 | 0xA1, 0x02, /* Collection (Logical), */ | ||
| 325 | 0x85, 0xEF, /* Report ID (239), */ | ||
| 326 | 0x75, 0x08, /* Report Size (8), */ | ||
| 327 | 0x95, 0x30, /* Report Count (48), */ | ||
| 328 | 0x09, 0x01, /* Usage (Pointer), */ | ||
| 329 | 0xB1, 0x02, /* Feature (Variable), */ | ||
| 330 | 0xC0, /* End Collection, */ | ||
| 331 | 0xC0 /* End Collection */ | ||
| 332 | }; | ||
| 251 | 333 | ||
| 252 | /* | 334 | /* |
| 253 | * The default descriptor doesn't provide mapping for the accelerometers | 335 | * The default descriptor doesn't provide mapping for the accelerometers |
| @@ -974,6 +1056,13 @@ static u8 *motion_fixup(struct hid_device *hdev, u8 *rdesc, | |||
| 974 | return motion_rdesc; | 1056 | return motion_rdesc; |
| 975 | } | 1057 | } |
| 976 | 1058 | ||
| 1059 | static u8 *navigation_fixup(struct hid_device *hdev, u8 *rdesc, | ||
| 1060 | unsigned int *rsize) | ||
| 1061 | { | ||
| 1062 | *rsize = sizeof(navigation_rdesc); | ||
| 1063 | return navigation_rdesc; | ||
| 1064 | } | ||
| 1065 | |||
| 977 | static __u8 *ps3remote_fixup(struct hid_device *hdev, __u8 *rdesc, | 1066 | static __u8 *ps3remote_fixup(struct hid_device *hdev, __u8 *rdesc, |
| 978 | unsigned int *rsize) | 1067 | unsigned int *rsize) |
| 979 | { | 1068 | { |
| @@ -1058,7 +1147,7 @@ static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
| 1058 | return motion_fixup(hdev, rdesc, rsize); | 1147 | return motion_fixup(hdev, rdesc, rsize); |
| 1059 | 1148 | ||
| 1060 | if (sc->quirks & NAVIGATION_CONTROLLER) | 1149 | if (sc->quirks & NAVIGATION_CONTROLLER) |
| 1061 | return sixaxis_fixup(hdev, rdesc, rsize); | 1150 | return navigation_fixup(hdev, rdesc, rsize); |
| 1062 | 1151 | ||
| 1063 | if (sc->quirks & PS3REMOTE) | 1152 | if (sc->quirks & PS3REMOTE) |
| 1064 | return ps3remote_fixup(hdev, rdesc, rsize); | 1153 | return ps3remote_fixup(hdev, rdesc, rsize); |
