On Fri, 3 Jun 2011 16:15:11 +0200 Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx> wrote: > I confirm that the axis for Dpad-left (usage->code == 0x2f IINM) of the > Sixaxis looks like it is not working. I too can see the data on hidraw > device but not on the joystick or even the event device, so it may be > below the joystick layer. > OK found something: 0x2f is ABS_MT_SLOT, http://lxr.linux.no/linux+*/include/linux/input.h#L773 And in input.c::input_handle_abs_event() this case is handled in a special way: http://lxr.linux.no/#linux+v2.6.39/drivers/input/input.c#L172 This little change improves thins a little bit, but the pressure event is now reported twice, once with the actual value and once with 0, you can test with: $ evtest /dev/input/eventX | \ egrep -v 'code (0|1|2|5|48|49|50|51|52|53|54|55|56|57|58|58|59)|Report Sync' Index: linux-2.6/drivers/input/input.c =================================================================== --- linux-2.6.orig/drivers/input/input.c +++ linux-2.6/drivers/input/input.c @@ -169,7 +169,7 @@ bool is_mt_event; int *pold; - if (code == ABS_MT_SLOT) { + if (code == ABS_MT_SLOT && dev->mtsize > 0) { /* * "Stage" the event; we'll flush it later, when we * get actual touch data. @@ -210,6 +210,9 @@ input_pass_event(dev, EV_ABS, ABS_MT_SLOT, dev->slot); } + if (code == 0x2f) + printk(KERN_DEBUG "%s: code: %08x handled value: %d\n", __func__, code, *pval); + return INPUT_PASS_TO_HANDLERS; } Otherwise we would need to remap the axis code to something more meaningful by patching the HID descriptor, can this be done? Regards, 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?
Attachment:
pgpjMiwFVMp41.pgp
Description: PGP signature