Re: [PATCH v2] Input: Fix the HID usage of DPAD input event generation.

2020-11-05 Thread Chris Ye
+sta...@vger.kernel.org On 11/3/20 9:36 AM, Benjamin Tissoires wrote: Hi Chris, On Mon, Nov 2, 2020 at 6:24 PM Chris Ye wrote: Hi Benjamin, I've tried the hid-tool for testing on my linux machine and it works. However the issue comes from a game controller I don't posses in hand right

Re: [PATCH v2] Input: Fix the HID usage of DPAD input event generation.

2020-11-04 Thread Chris Ye
Hi Benjamin,    We are using hid driver to inject hid report for D-Pad and Hat switch events, like:   [0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], Check the HID format dump from kernel, this will send a 0x1 on HID usage GenericDesktop.HatSwitch. Do you ne

Re: [PATCH v2] Input: Fix the HID usage of DPAD input event generation.

2020-11-03 Thread Benjamin Tissoires
Hi Chris, On Mon, Nov 2, 2020 at 6:24 PM Chris Ye wrote: > > Hi Benjamin, > > I've tried the hid-tool for testing on my linux machine and it > works. However the issue comes from a game controller I don't posses in > hand right now so I can't physically connect it and provide the log from >

Re: [PATCH v2] Input: Fix the HID usage of DPAD input event generation.

2020-11-02 Thread Chris Ye
Hi Benjamin,     I've tried the hid-tool for testing on my linux machine and it works.  However the issue comes from a game controller I don't posses in hand right now so I can't physically connect it and provide the log from hid-tool recording.  I do have the raw HID descriptor and in Linux

Re: [PATCH v2] Input: Fix the HID usage of DPAD input event generation.

2020-11-02 Thread Benjamin Tissoires
Hi Chris, On Sun, Nov 1, 2020 at 8:35 PM Chris Ye wrote: > > Generic Desktop DPAD usage is mapped by hid-input, that only the first > DPAD usage maps to usage type EV_ABS and code of an axis. If HID > descriptor has DPAD UP/DOWN/LEFT/RIGHT HID usages and each of usage size > is 1 bit, then only

[PATCH v2] Input: Fix the HID usage of DPAD input event generation.

2020-11-01 Thread Chris Ye
Generic Desktop DPAD usage is mapped by hid-input, that only the first DPAD usage maps to usage type EV_ABS and code of an axis. If HID descriptor has DPAD UP/DOWN/LEFT/RIGHT HID usages and each of usage size is 1 bit, then only the first one will generate input event, the rest of the HID usages wi