@@ -248,6 +248,88 @@ static __u8 motion_rdesc[] = {
248248 0xC0 /* End Collection */
249249};
250250
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+ };
251333
252334/*
253335 * The default descriptor doesn't provide mapping for the accelerometers
@@ -974,6 +1056,13 @@ static u8 *motion_fixup(struct hid_device *hdev, u8 *rdesc,
9741056 return motion_rdesc ;
9751057}
9761058
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+
9771066static __u8 * ps3remote_fixup (struct hid_device * hdev , __u8 * rdesc ,
9781067 unsigned int * rsize )
9791068{
@@ -1058,7 +1147,7 @@ static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
10581147 return motion_fixup (hdev , rdesc , rsize );
10591148
10601149 if (sc -> quirks & NAVIGATION_CONTROLLER )
1061- return sixaxis_fixup (hdev , rdesc , rsize );
1150+ return navigation_fixup (hdev , rdesc , rsize );
10621151
10631152 if (sc -> quirks & PS3REMOTE )
10641153 return ps3remote_fixup (hdev , rdesc , rsize );
0 commit comments