linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
@ 2015-10-29 15:09 Andrew Shadura
  2015-11-24 12:24 ` Andrew Shadura
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Shadura @ 2015-10-29 15:09 UTC (permalink / raw)
  To: Linux Input Mailing List; +Cc: Christian Gmeiner

PenMount 6000 USB resistive touchscreen controller reports it has three
buttons, while in reality it doesn't have any and doesn't support active
styli, and only generates touch events.

In penmount_input_mapping(), map only the first button (with code 0),
ignore the rest.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
---
  I tested the patch on with my touchscreen. When I run evtest on this device,
  without the patch I get three buttons (I shortened the output):
  
    Event type 1 (EV_KEY)
      Event code 330 (BTN_TOUCH)
      Event code 331 (BTN_STYLUS)
      Event code 332 (BTN_STYLUS2)
  
  And the device isn't recognised by libinput.
  
  When the patch is applied, however, the output of evtest is the following:
  
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x14e1 product 0x6000 version 0x101
  Input device name: "DIALOGUE INC PenMount USB"
  Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
      Event code 330 (BTN_TOUCH)
    Event type 3 (EV_ABS)
      Event code 0 (ABS_X)
        Value      0
        Min        0
        Max     1023
      Event code 1 (ABS_Y)
        Value      0
        Min        0
        Max     1023
    Event type 4 (EV_MSC)
      Event code 4 (MSC_SCAN)
  Properties:
  
  And libevent-list-devices now mentions the touchscreen device, too:
  
  Device:           DIALOGUE INC PenMount USB
  Kernel:           /dev/input/event16
  Group:            4
  Seat:             seat0, default
  Capabilities:     touch
  Tap-to-click:     n/a
  Tap drag lock:    n/a
  Left-handed:      n/a
  Nat.scrolling:    n/a
  Middle emulation: n/a
  Calibration:      identity matrix
  Scroll methods:   none
  Click methods:    none

 drivers/hid/hid-penmount.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-penmount.c b/drivers/hid/hid-penmount.c
index c11dce8..d90383f 100644
--- a/drivers/hid/hid-penmount.c
+++ b/drivers/hid/hid-penmount.c
@@ -23,8 +23,12 @@ static int penmount_input_mapping(struct hid_device *hdev,
 		struct hid_usage *usage, unsigned long **bit, int *max)
 {
 	if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
-		hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
-		return 1;
+		if (((usage->hid - 1) & HID_USAGE) == 0) {
+			hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
+			return 1;
+		} else {
+			return -1;
+		}
 	}
 
 	return 0;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
@ 2015-11-19 15:04 Andrew Shadura
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Shadura @ 2015-11-19 15:04 UTC (permalink / raw)
  To: Linux Input Mailing List

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

On 29/10/15 16:00, Andrew Shadura wrote:
> PenMount 6000 USB resistive touchscreen controller reports it has three
> buttons, while in reality it doesn't have any and doesn't support active
> styli, and only generates touch events.
> 
> In penmount_input_mapping(), map only the first button (with code 0),
> ignore the rest.
> 
> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>

Any updates on this patch?

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2015-10-29 15:09 Andrew Shadura
@ 2015-11-24 12:24 ` Andrew Shadura
  2015-11-27 15:18   ` Christian Gmeiner
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Shadura @ 2015-11-24 12:24 UTC (permalink / raw)
  To: Linux Input Mailing List; +Cc: Jiří Kosina

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

On 29/10/15 16:00, Andrew Shadura wrote:
> PenMount 6000 USB resistive touchscreen controller reports it has three
> buttons, while in reality it doesn't have any and doesn't support active
> styli, and only generates touch events.
> 
> In penmount_input_mapping(), map only the first button (with code 0),
> ignore the rest.
> 
> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>

Any news on this patch? It'd be cool if it could be merged.

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2015-11-24 12:24 ` Andrew Shadura
@ 2015-11-27 15:18   ` Christian Gmeiner
  2016-01-12 14:59     ` Andrew Shadura
  0 siblings, 1 reply; 11+ messages in thread
From: Christian Gmeiner @ 2015-11-27 15:18 UTC (permalink / raw)
  To: Andrew Shadura; +Cc: Linux Input Mailing List, Jiří Kosina

2015-11-24 13:24 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
> On 29/10/15 16:00, Andrew Shadura wrote:
>> PenMount 6000 USB resistive touchscreen controller reports it has three
>> buttons, while in reality it doesn't have any and doesn't support active
>> styli, and only generates touch events.
>>
>> In penmount_input_mapping(), map only the first button (with code 0),
>> ignore the rest.
>>
>> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
>
> Any news on this patch? It'd be cool if it could be merged.
>

I try to get access to the hardware and will test it.

greets
--
Christian Gmeiner, MSc

https://soundcloud.com/christian-gmeiner

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2015-11-27 15:18   ` Christian Gmeiner
@ 2016-01-12 14:59     ` Andrew Shadura
  2016-03-10 11:46       ` Andrew Shadura
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Shadura @ 2016-01-12 14:59 UTC (permalink / raw)
  To: Christian Gmeiner; +Cc: Linux Input Mailing List, Jiří Kosina

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

On 27/11/15 16:18, Christian Gmeiner wrote:
> 2015-11-24 13:24 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
>> On 29/10/15 16:00, Andrew Shadura wrote:
>>> PenMount 6000 USB resistive touchscreen controller reports it has three
>>> buttons, while in reality it doesn't have any and doesn't support active
>>> styli, and only generates touch events.
>>>
>>> In penmount_input_mapping(), map only the first button (with code 0),
>>> ignore the rest.
>>>
>>> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
>>
>> Any news on this patch? It'd be cool if it could be merged.
> 
> I try to get access to the hardware and will test it.

Christian, have you had a chance to test the patch?

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2016-01-12 14:59     ` Andrew Shadura
@ 2016-03-10 11:46       ` Andrew Shadura
  2016-03-10 13:47         ` Christian Gmeiner
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Shadura @ 2016-03-10 11:46 UTC (permalink / raw)
  To: Christian Gmeiner; +Cc: Linux Input Mailing List, Jiří Kosina


[-- Attachment #1.1: Type: text/plain, Size: 904 bytes --]

On 12/01/16 15:59, Andrew Shadura wrote:
> On 27/11/15 16:18, Christian Gmeiner wrote:
>> > 2015-11-24 13:24 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
>>> >> On 29/10/15 16:00, Andrew Shadura wrote:
>>>> >>> PenMount 6000 USB resistive touchscreen controller reports it has three
>>>> >>> buttons, while in reality it doesn't have any and doesn't support active
>>>> >>> styli, and only generates touch events.
>>>> >>>
>>>> >>> In penmount_input_mapping(), map only the first button (with code 0),
>>>> >>> ignore the rest.
>>>> >>>
>>>> >>> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
>>> >>
>>> >> Any news on this patch? It'd be cool if it could be merged.
>> > 
>> > I try to get access to the hardware and will test it.
> Christian, have you had a chance to test the patch?

Ping, once again. Any progress on this?

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2016-03-10 11:46       ` Andrew Shadura
@ 2016-03-10 13:47         ` Christian Gmeiner
  2016-03-10 16:11           ` Jiri Kosina
  0 siblings, 1 reply; 11+ messages in thread
From: Christian Gmeiner @ 2016-03-10 13:47 UTC (permalink / raw)
  To: Andrew Shadura; +Cc: Linux Input Mailing List, Jiří Kosina

2016-03-10 12:46 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
> On 12/01/16 15:59, Andrew Shadura wrote:
>> On 27/11/15 16:18, Christian Gmeiner wrote:
>>> > 2015-11-24 13:24 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
>>>> >> On 29/10/15 16:00, Andrew Shadura wrote:
>>>>> >>> PenMount 6000 USB resistive touchscreen controller reports it has three
>>>>> >>> buttons, while in reality it doesn't have any and doesn't support active
>>>>> >>> styli, and only generates touch events.
>>>>> >>>
>>>>> >>> In penmount_input_mapping(), map only the first button (with code 0),
>>>>> >>> ignore the rest.
>>>>> >>>
>>>>> >>> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
>>>> >>
>>>> >> Any news on this patch? It'd be cool if it could be merged.
>>> >
>>> > I try to get access to the hardware and will test it.
>> Christian, have you had a chance to test the patch?
>
> Ping, once again. Any progress on this?

Sorry for the long delay. I have applied your patch and the touch
works as expected.


No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      Power Button
/dev/input/event1:      Lid Switch
/dev/input/event2:      Sleep Button
/dev/input/event3:      Video Bus
/dev/input/event4:      DIALOGUE INC PenMount USB
Select the device event number [0-4]: 4
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x14e1 product 0x6000 version 0x101
Input device name: "DIALOGUE INC PenMount USB"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max     1023
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max     1023
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)




Tested-by: Christian Gmeiner <c.gmeiner@bachmann.info

greets
--
Christian Gmeiner, MSc

https://soundcloud.com/christian-gmeiner

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2016-03-10 13:47         ` Christian Gmeiner
@ 2016-03-10 16:11           ` Jiri Kosina
  2016-03-10 16:11             ` Andrew Shadura
  0 siblings, 1 reply; 11+ messages in thread
From: Jiri Kosina @ 2016-03-10 16:11 UTC (permalink / raw)
  To: Christian Gmeiner; +Cc: Andrew Shadura, Linux Input Mailing List

On Thu, 10 Mar 2016, Christian Gmeiner wrote:

> 2016-03-10 12:46 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
> > On 12/01/16 15:59, Andrew Shadura wrote:
> >> On 27/11/15 16:18, Christian Gmeiner wrote:
> >>> > 2015-11-24 13:24 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
> >>>> >> On 29/10/15 16:00, Andrew Shadura wrote:
> >>>>> >>> PenMount 6000 USB resistive touchscreen controller reports it has three
> >>>>> >>> buttons, while in reality it doesn't have any and doesn't support active
> >>>>> >>> styli, and only generates touch events.
> >>>>> >>>
> >>>>> >>> In penmount_input_mapping(), map only the first button (with code 0),
> >>>>> >>> ignore the rest.
> >>>>> >>>
> >>>>> >>> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
> >>>> >>
> >>>> >> Any news on this patch? It'd be cool if it could be merged.
> >>> >
> >>> > I try to get access to the hardware and will test it.
> >> Christian, have you had a chance to test the patch?
> >
> > Ping, once again. Any progress on this?
> 
> Sorry for the long delay. I have applied your patch and the touch
> works as expected.
> 
> No device specified, trying to scan all of /dev/input/event*
> Available devices:
> /dev/input/event0:      Power Button
> /dev/input/event1:      Lid Switch
> /dev/input/event2:      Sleep Button
> /dev/input/event3:      Video Bus
> /dev/input/event4:      DIALOGUE INC PenMount USB
> Select the device event number [0-4]: 4
> Input driver version is 1.0.1
> Input device ID: bus 0x3 vendor 0x14e1 product 0x6000 version 0x101
> Input device name: "DIALOGUE INC PenMount USB"
> Supported events:
>   Event type 0 (EV_SYN)
>   Event type 1 (EV_KEY)
>     Event code 330 (BTN_TOUCH)
>   Event type 3 (EV_ABS)
>     Event code 0 (ABS_X)
>       Value      0
>       Min        0
>       Max     1023
>     Event code 1 (ABS_Y)
>       Value      0
>       Min        0
>       Max     1023
>   Event type 4 (EV_MSC)
>     Event code 4 (MSC_SCAN)
> Properties:
> Testing ... (interrupt to exit)
> 
> Tested-by: Christian Gmeiner <c.gmeiner@bachmann.info

Could you guys please bounce / resend the patch to me? I don't seem to 
see it in my inbox.

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2016-03-10 16:11           ` Jiri Kosina
@ 2016-03-10 16:11             ` Andrew Shadura
  2016-03-10 16:18               ` Jiri Kosina
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Shadura @ 2016-03-10 16:11 UTC (permalink / raw)
  To: Jiri Kosina, Christian Gmeiner; +Cc: Linux Input Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 2655 bytes --]

On 10/03/16 17:11, Jiri Kosina wrote:
> On Thu, 10 Mar 2016, Christian Gmeiner wrote:
> 
>> > 2016-03-10 12:46 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
>>> > > On 12/01/16 15:59, Andrew Shadura wrote:
>>>> > >> On 27/11/15 16:18, Christian Gmeiner wrote:
>>>>>> > >>> > 2015-11-24 13:24 GMT+01:00 Andrew Shadura <andrew.shadura@collabora.co.uk>:
>>>>>>>> > >>>> >> On 29/10/15 16:00, Andrew Shadura wrote:
>>>>>>>>>> > >>>>> >>> PenMount 6000 USB resistive touchscreen controller reports it has three
>>>>>>>>>> > >>>>> >>> buttons, while in reality it doesn't have any and doesn't support active
>>>>>>>>>> > >>>>> >>> styli, and only generates touch events.
>>>>>>>>>> > >>>>> >>>
>>>>>>>>>> > >>>>> >>> In penmount_input_mapping(), map only the first button (with code 0),
>>>>>>>>>> > >>>>> >>> ignore the rest.
>>>>>>>>>> > >>>>> >>>
>>>>>>>>>> > >>>>> >>> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
>>>>>>>> > >>>> >>
>>>>>>>> > >>>> >> Any news on this patch? It'd be cool if it could be merged.
>>>>>> > >>> >
>>>>>> > >>> > I try to get access to the hardware and will test it.
>>>> > >> Christian, have you had a chance to test the patch?
>>> > >
>>> > > Ping, once again. Any progress on this?
>> > 
>> > Sorry for the long delay. I have applied your patch and the touch
>> > works as expected.
>> > 
>> > No device specified, trying to scan all of /dev/input/event*
>> > Available devices:
>> > /dev/input/event0:      Power Button
>> > /dev/input/event1:      Lid Switch
>> > /dev/input/event2:      Sleep Button
>> > /dev/input/event3:      Video Bus
>> > /dev/input/event4:      DIALOGUE INC PenMount USB
>> > Select the device event number [0-4]: 4
>> > Input driver version is 1.0.1
>> > Input device ID: bus 0x3 vendor 0x14e1 product 0x6000 version 0x101
>> > Input device name: "DIALOGUE INC PenMount USB"
>> > Supported events:
>> >   Event type 0 (EV_SYN)
>> >   Event type 1 (EV_KEY)
>> >     Event code 330 (BTN_TOUCH)
>> >   Event type 3 (EV_ABS)
>> >     Event code 0 (ABS_X)
>> >       Value      0
>> >       Min        0
>> >       Max     1023
>> >     Event code 1 (ABS_Y)
>> >       Value      0
>> >       Min        0
>> >       Max     1023
>> >   Event type 4 (EV_MSC)
>> >     Event code 4 (MSC_SCAN)
>> > Properties:
>> > Testing ... (interrupt to exit)
>> > 
>> > Tested-by: Christian Gmeiner <c.gmeiner@bachmann.info
> Could you guys please bounce / resend the patch to me? I don't seem to 
> see it in my inbox.

It's in the patchwork here:

https://patchwork.kernel.org/patch/7519541/

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2016-03-10 16:11             ` Andrew Shadura
@ 2016-03-10 16:18               ` Jiri Kosina
  2016-03-14 13:47                 ` Andrew Shadura
  0 siblings, 1 reply; 11+ messages in thread
From: Jiri Kosina @ 2016-03-10 16:18 UTC (permalink / raw)
  To: Andrew Shadura; +Cc: Christian Gmeiner, Linux Input Mailing List

On Thu, 10 Mar 2016, Andrew Shadura wrote:

> It's in the patchwork here:
> 
> https://patchwork.kernel.org/patch/7519541/

Applied to for-4.6/penmount.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller
  2016-03-10 16:18               ` Jiri Kosina
@ 2016-03-14 13:47                 ` Andrew Shadura
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Shadura @ 2016-03-14 13:47 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Christian Gmeiner, Linux Input Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 475 bytes --]

On 10/03/16 17:18, Jiri Kosina wrote:
> On Thu, 10 Mar 2016, Andrew Shadura wrote:
> 
>> It's in the patchwork here:
>>
>> https://patchwork.kernel.org/patch/7519541/
> 
> Applied to for-4.6/penmount.

In,
http://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-4.6/penmount&id=5f66872cbd9c2d8e5230da571aed52d9333a04ae
I noticed you haven't fixed Christian's Tested-By (missing closing
bracket). Was that intentional?

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-03-14 13:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 15:04 [PATCH v2] HID: report only one button for PenMount 6000 USB touchscreen controller Andrew Shadura
  -- strict thread matches above, loose matches on Subject: below --
2015-10-29 15:09 Andrew Shadura
2015-11-24 12:24 ` Andrew Shadura
2015-11-27 15:18   ` Christian Gmeiner
2016-01-12 14:59     ` Andrew Shadura
2016-03-10 11:46       ` Andrew Shadura
2016-03-10 13:47         ` Christian Gmeiner
2016-03-10 16:11           ` Jiri Kosina
2016-03-10 16:11             ` Andrew Shadura
2016-03-10 16:18               ` Jiri Kosina
2016-03-14 13:47                 ` Andrew Shadura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).