lkml.org 
[lkml]   [2011]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv4 1/3] sony_ff_hid_descriptor
On Sat,  4 Jun 2011 02:32:35 -0700
Simon Wood <simon@mungewell.org> wrote:

> This patch modifies the HID descriptor of the Sixaxis controller
> to allow the reporting of the accelerometers and gyro via
> a joystick axis.
>
> rewrite section from offset 148

From offset 83? Below I see rdesc[83] == 0x75

> --
> 0x75, 0x08, /* Report Size (8), */
> 0x95, 0x27, /* Report Count (39), */ /* all the other data
> lumped together */

I'd keep commit messages wrapped to 72/80 chars as well if possible.

[...]
> @@ -43,6 +49,11 @@ static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
> hid_info(hdev, "Fixing up Sony Vaio VGX report descriptor\n");
> rdesc[55] = 0x06;
> }
> + if ((sc->quirks & SIXAXIS_CONTROLLER_USB) &&
> + *rsize == 148 && rdesc[83] == 0x75) {
> + hid_info(hdev, "Fixing up Sony Sixaxis report descriptor\n");
> + memcpy((void *)&rdesc[83], (void *) &sixaxis_rdesc_fixup, sizeof(sixaxis_rdesc_fixup));
> + }
> return rdesc;
> }
>

Thanks,
Antonio

--
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-06-08 09:47    [from the cache]
©2003-2011 Jasper Spaans