aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2014-06-24 07:28:42 -0400
committerJiri Kosina <jkosina@suse.cz>2014-06-25 15:21:18 -0400
commitfb705a6dc8e997ea26f0bd93f58c43e2f0592d3a (patch)
tree2fb0e3dcad61582d47aed8aeb61802776c076c26
parentc607fb8d671693ddc699b56d18cbd185e4a91ad2 (diff)
HID: sony: Format and comment sixaxis_rdesc
Reformat sixaxis_rdesc to reflect its HID structure, and comment each field. This will make it easier to validate changes to the descriptor in the future. No functional changes are introduced, the descriptor is exactly the same as before byte by byte. The heavy lifting has been done with the help of hidrd-convert: https://github.com/DIGImend/hidrd Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-sony.c93
1 files changed, 74 insertions, 19 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 11026b55669b..22ba5ddfde1c 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -57,25 +57,80 @@
57#define MAX_LEDS 4 57#define MAX_LEDS 4
58 58
59static __u8 sixaxis_rdesc[] = { 59static __u8 sixaxis_rdesc[] = {
60 0x05, 0x01, 0x09, 0x04, 0xa1, 0x01, 0xa1, 0x02, 60 0x05, 0x01, /* Usage Page (Desktop), */
61 0x85, 0x01, 0x75, 0x08, 0x95, 0x01, 0x15, 0x00, 61 0x09, 0x04, /* Usage (Joystik), */
62 0x26, 0xff, 0x00, 0x81, 0x03, 0x75, 0x01, 0x95, 62 0xA1, 0x01, /* Collection (Application), */
63 0x13, 0x15, 0x00, 0x25, 0x01, 0x35, 0x00, 0x45, 63 0xA1, 0x02, /* Collection (Logical), */
64 0x01, 0x05, 0x09, 0x19, 0x01, 0x29, 0x13, 0x81, 64 0x85, 0x01, /* Report ID (1), */
65 0x02, 0x75, 0x01, 0x95, 0x0d, 0x06, 0x00, 0xff, 65 0x75, 0x08, /* Report Size (8), */
66 0x81, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x05, 66 0x95, 0x01, /* Report Count (1), */
67 0x01, 0x09, 0x01, 0xa1, 0x00, 0x75, 0x08, 0x95, 67 0x15, 0x00, /* Logical Minimum (0), */
68 0x04, 0x35, 0x00, 0x46, 0xff, 0x00, 0x09, 0x30, 68 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
69 0x09, 0x31, 0x09, 0x32, 0x09, 0x35, 0x81, 0x02, 69 0x81, 0x03, /* Input (Constant, Variable), */
70 0xc0, 0x05, 0x01, 0x95, 0x13, 0x09, 0x01, 0x81, 70 0x75, 0x01, /* Report Size (1), */
71 0x02, 0x95, 0x0c, 0x81, 0x01, 0x75, 0x10, 0x95, 71 0x95, 0x13, /* Report Count (19), */
72 0x04, 0x26, 0xff, 0x03, 0x46, 0xff, 0x03, 0x09, 72 0x15, 0x00, /* Logical Minimum (0), */
73 0x01, 0x81, 0x02, 0xc0, 0xa1, 0x02, 0x85, 0x02, 73 0x25, 0x01, /* Logical Maximum (1), */
74 0x75, 0x08, 0x95, 0x30, 0x09, 0x01, 0xb1, 0x02, 74 0x35, 0x00, /* Physical Minimum (0), */
75 0xc0, 0xa1, 0x02, 0x85, 0xee, 0x75, 0x08, 0x95, 75 0x45, 0x01, /* Physical Maximum (1), */
76 0x30, 0x09, 0x01, 0xb1, 0x02, 0xc0, 0xa1, 0x02, 76 0x05, 0x09, /* Usage Page (Button), */
77 0x85, 0xef, 0x75, 0x08, 0x95, 0x30, 0x09, 0x01, 77 0x19, 0x01, /* Usage Minimum (01h), */
78 0xb1, 0x02, 0xc0, 0xc0, 78 0x29, 0x13, /* Usage Maximum (13h), */
79 0x81, 0x02, /* Input (Variable), */
80 0x75, 0x01, /* Report Size (1), */
81 0x95, 0x0D, /* Report Count (13), */
82 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
83 0x81, 0x03, /* Input (Constant, Variable), */
84 0x15, 0x00, /* Logical Minimum (0), */
85 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
86 0x05, 0x01, /* Usage Page (Desktop), */
87 0x09, 0x01, /* Usage (Pointer), */
88 0xA1, 0x00, /* Collection (Physical), */
89 0x75, 0x08, /* Report Size (8), */
90 0x95, 0x04, /* Report Count (4), */
91 0x35, 0x00, /* Physical Minimum (0), */
92 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
93 0x09, 0x30, /* Usage (X), */
94 0x09, 0x31, /* Usage (Y), */
95 0x09, 0x32, /* Usage (Z), */
96 0x09, 0x35, /* Usage (Rz), */
97 0x81, 0x02, /* Input (Variable), */
98 0xC0, /* End Collection, */
99 0x05, 0x01, /* Usage Page (Desktop), */
100 0x95, 0x13, /* Report Count (19), */
101 0x09, 0x01, /* Usage (Pointer), */
102 0x81, 0x02, /* Input (Variable), */
103 0x95, 0x0C, /* Report Count (12), */
104 0x81, 0x01, /* Input (Constant), */
105 0x75, 0x10, /* Report Size (16), */
106 0x95, 0x04, /* Report Count (4), */
107 0x26, 0xFF, 0x03, /* Logical Maximum (1023), */
108 0x46, 0xFF, 0x03, /* Physical Maximum (1023), */
109 0x09, 0x01, /* Usage (Pointer), */
110 0x81, 0x02, /* Input (Variable), */
111 0xC0, /* End Collection, */
112 0xA1, 0x02, /* Collection (Logical), */
113 0x85, 0x02, /* Report ID (2), */
114 0x75, 0x08, /* Report Size (8), */
115 0x95, 0x30, /* Report Count (48), */
116 0x09, 0x01, /* Usage (Pointer), */
117 0xB1, 0x02, /* Feature (Variable), */
118 0xC0, /* End Collection, */
119 0xA1, 0x02, /* Collection (Logical), */
120 0x85, 0xEE, /* Report ID (238), */
121 0x75, 0x08, /* Report Size (8), */
122 0x95, 0x30, /* Report Count (48), */
123 0x09, 0x01, /* Usage (Pointer), */
124 0xB1, 0x02, /* Feature (Variable), */
125 0xC0, /* End Collection, */
126 0xA1, 0x02, /* Collection (Logical), */
127 0x85, 0xEF, /* Report ID (239), */
128 0x75, 0x08, /* Report Size (8), */
129 0x95, 0x30, /* Report Count (48), */
130 0x09, 0x01, /* Usage (Pointer), */
131 0xB1, 0x02, /* Feature (Variable), */
132 0xC0, /* End Collection, */
133 0xC0 /* End Collection */
79}; 134};
80 135
81/* 136/*