Patch to consider for stable 3.18, 4.4 and 4.9

2018-03-05 Thread Tomasz Kramkowski
6488]: HID: clamp input to logical range if no null state If the patch [9547837bdccb] is not relevant then feel free to ignore this email. Thanks, -- Tomasz Kramkowski

[PATCH 2/2] HID: elecom: add support for EX-G M-XT4DRBK trackball

2018-03-01 Thread Tomasz Kramkowski
This patch enables the 6th button on the ELECOM EX-G M-XT4DRBK trackball mouse. This is a left handed EX-G variant which only comes in a wireless (D) model. It has a total of 6 buttons but one of these is not available because of how the HID descriptor is configured. Signed-off-by: Tomasz

[PATCH 1/2] HID: elecom: refer to trackballs by model name instead of series

2018-03-01 Thread Tomasz Kramkowski
. Signed-off-by: Tomasz Kramkowski --- If this patch is too trivial to bother then feel free to ask and I'll amend the second patch to use a different naming scheme. I did a survey of mouse model names and VID:PID values here: https://www.reddit.com/r/Trackballs/comments/7vqraz/ --- driver

[PATCH v2] HID: elecom: rewrite report fixup for EX-G and future mice

2017-12-19 Thread Tomasz Kramkowski
ucing phantom buttons which would in turn cause the number of mouse buttons to be misreported to userspace. This patch drops the very verbose report descriptor "diff" comment for a more abridged yet hopefully just as informative generic version. Signed-off-by: Tomasz Kramkowski --- v2

Re: [PATCH] HID: elecom: rewrite report fixup for EX-G and future mice

2017-12-13 Thread Tomasz Kramkowski
nction don't match the expected report and don't apply the fix, or (unlikely) some padding bits get exposed as buttons with no function. Either way, I've made this change locally and will be submitting v2 when I have a bit more time later this week. > Thanks, > Alex -- Tomasz K

Re: [PATCH] HID: elecom: rewrite report fixup for EX-G and future mice

2017-12-09 Thread Tomasz Kramkowski
On Thu, Dec 07, 2017 at 11:04:37AM +0100, Jiri Kosina wrote: > On Tue, 5 Dec 2017, Tomasz Kramkowski wrote: > > > On Mon, Dec 04, 2017 at 08:55:50PM +0000, Tomasz Kramkowski wrote: > > > +static void mouse_button_fixup(struct hid_device *hdev, > > > +

Re: [PATCH] HID: elecom: rewrite report fixup for EX-G and future mice

2017-12-05 Thread Tomasz Kramkowski
On Mon, Dec 04, 2017 at 08:55:50PM +, Tomasz Kramkowski wrote: > +static void mouse_button_fixup(struct hid_device *hdev, > +__u8 *rdesc, unsigned int *rsize, > +int nbuttons) I've just remembered what has been bugging me

[PATCH] HID: elecom: rewrite report fixup for EX-G and future mice

2017-12-04 Thread Tomasz Kramkowski
ucing phantom buttons which would in turn cause the number of mouse buttons to be misreported to userspace. This patch drops the very verbose report descriptor "diff" comment for a more abridged yet hopefully just as informative generic version. Signed-off-by: Tomasz Kramkowski --- I&#x

Re: [PATCH] HID: elecom: fix the descriptor of the EX-G trackball

2017-11-18 Thread Tomasz Kramkowski
note that the documentation is not gone, it's just shortened and generalised, there is still more than enough information to work out exactly what the report change is. -- Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/

Re: [PATCH] HID: elecom: fix the descriptor of the EX-G trackball

2017-11-18 Thread Tomasz Kramkowski
On Sat, Nov 18, 2017 at 10:27:26PM +, Tomasz Kramkowski wrote: > I was going to do this just now actually but then I noticed that someone > had beat me to the punch with the EX-G (I was already surprised when I > found someone had patched the HUGE and DEFT). Actually, I'll put

Re: [PATCH] HID: elecom: fix the descriptor of the EX-G trackball

2017-11-18 Thread Tomasz Kramkowski
ecing the information together out of the MHonArc header in the spinics.net archive. This seems to be the only downside of mailing lists. -- Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/

Re: [PATCH 3.16 153/233] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter

2017-09-10 Thread Tomasz Kramkowski
On Sat, Sep 09, 2017 at 10:47:14PM +0100, Ben Hutchings wrote: > 3.16.48-rc1 review patch. If anyone has any objections, please let me know. > > -- > > From: Tomasz Kramkowski > > commit 9547837bdccb4af127528b36a73377150658b4ac upstream. > > The

Re: [PATCH v2] HID: clamp input to logical range if no null state

2017-03-14 Thread Tomasz Kramkowski
appended after the fact. Thanks, -- Tomasz Kramkowski

[PATCH v2] HID: clamp input to logical range if no null state

2017-03-14 Thread Tomasz Kramkowski
erspace as is. Now these values will get clamped to the logical range before being forwarded to userspace. This device was also used to test this patch. This patch expands on commit 3f3752705dbd ("HID: reject input outside logical range only if null state is set"). Signed-off-by: Tomasz Kr

Re: [PATCH 1/1] HID: clamp input to logical range if no null state

2017-03-12 Thread Tomasz Kramkowski
} + value = clamp(value, + field->logical_minimum, + field->logical_maximum); } /* -- 2.12.0 For me it is a bit clearer on what is happening and still avoids doing the range check twice. But ultimately

[PATCH 1/1] HID: clamp input to logical range if no null state

2017-03-08 Thread Tomasz Kramkowski
.org/r/20170307131036.GA853@gaia.local [2]: https://msdn.microsoft.com/en-us/library/windows/hardware/dn672278(v=vs.85).asp Signed-off-by: Tomasz Kramkowski --- drivers/hid/hid-input.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-input.c b/driver

Re: [PATCH v2 0/2] patches for Innomedia INNEX GENESIS/ATARI adapter

2017-03-07 Thread Tomasz Kramkowski
r a new patch. > Maybe we can follow this to say we are mimicking Microsoft's driver and > hope for the best? Their approach to the ambiguity takes the safest bet and compatibility with them might not be a bad idea anyway so I agree with following their interpretation. I will not

Re: [PATCH v2 0/2] patches for Innomedia INNEX GENESIS/ATARI adapter

2017-03-04 Thread Tomasz Kramkowski
think you're right that this patch is not likely to bring about any issues, but I think it's more likely that this bit is simply generally avoided due to the ambiguity of its specification rather than the explicit correctness of our interpretations. I think to some extent it might even be worth bringing Denilson Figueiredo de Sá for his opinion on my and your interpretations of the spec. Thank you for your review, I greatly appreciate your time spent going over my interpretation. -- Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/

[PATCH v2 2/2] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter

2017-02-14 Thread Tomasz Kramkowski
The (1292:4745) Innomedia INNEX GENESIS/ATARI adapter needs HID_QUIRK_MULTI_INPUT to split the device up into two controllers instead of inputs from both being merged into one. Signed-off-by: Tomasz Kramkowski --- drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2

[PATCH v2 1/2] HID: reject input outside logical range only if null state is set

2017-02-14 Thread Tomasz Kramkowski
resolve issues with some game controllers, such as: https://bugzilla.kernel.org/show_bug.cgi?id=68621 [t...@the-tk.com: shortened and fixed spelling in commit message] Signed-off-by: Valtteri Heikkilä Signed-off-by: Tomasz Kramkowski --- drivers/hid/hid-input.c | 1 + 1 file changed, 1 insertion

[PATCH v2 0/2] patches for Innomedia INNEX GENESIS/ATARI adapter

2017-02-14 Thread Tomasz Kramkowski
lay page." The two other annotated examples mentioning this flag (§A.3.1, §A.3.2) do not have the same contradictory wording suggesting that this was possibly a mistake. Personally I am not entirely sure I am interpreting everything correctly, but it seems that the "No Null Position/Null State&qu

Re: [PATCH 0/2] patches for Innomedia INNEX GENESIS/ATARI adapter

2017-01-08 Thread Tomasz Kramkowski
make sure there are no issues in other applications and to make sure that other devices still operate correctly too. Once that is done I will go ahead and send two patches, one with the authorship preserved for the bugzilla patch and one patch to add the quirks. -- Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/

Re: [PATCH 0/2] patches for Innomedia INNEX GENESIS/ATARI adapter

2016-12-19 Thread Tomasz Kramkowski
u agree, I can do that myself and apply. > > Thanks, > > -- > Jiri Kosina > SUSE Labs > It's perfectly fine if you squash them, I was erring on the side of caution, I would rather send two patches and have them squash than to have to resend after splitting. Thanks, --

[PATCH 2/2] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter

2016-12-16 Thread Tomasz Kramkowski
The (1292:4745) Innomedia INNEX GENESIS/ATARI adapter needs HID_QUIRK_MULTI_INPUT to split the device up into two controllers instead of inputs from both being merged into one. This patch depends on patch 1. Signed-off-by: Tomasz Kramkowski --- drivers/hid/usbhid/hid-quirks.c | 1 + 1 file

[PATCH 0/2] patches for Innomedia INNEX GENESIS/ATARI adapter

2016-12-16 Thread Tomasz Kramkowski
add it to some default config so I left that alone. Hopefully I didn't screw anything up. Thanks, -- Tomasz Kramkowski Tomasz Kramkowski (2): HID: add Innomedia INNEX GENESIS/ATARI adapter support HID: usbhid: add quirk for Innomedia INNEX GENESIS/ATARI adapter drivers/hid/Kconfig

[PATCH 1/2] HID: add innomedia INNEX GENESIS/ATARI adapter support

2016-12-16 Thread Tomasz Kramkowski
incorrectly reports up or left respectively. Signed-off-by: Tomasz Kramkowski --- drivers/hid/Kconfig | 6 + drivers/hid/Makefile| 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-innomedia.c | 63