All of lore.kernel.org
 help / color / mirror / Atom feed
* Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4
@ 2013-06-19  7:12 Jan Kandziora
  2013-06-19  7:50 ` Benjamin Tissoires
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kandziora @ 2013-06-19  7:12 UTC (permalink / raw)
  To: linux-input

Hello,

I have a Posiflex 7215 POS system which has a USB touchscreen controller
onboard. I've done a kernel update from 2.6.35.4 to 3.9.4 and the touch
stopped working correctly. I tried with the generic usb hid driver, the
usbtouchscreen driver doesn't support this usb id. Evtest says:


# evtest /dev/input/event4
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0xd3a product 0xa000 version 0x110
Input device name: "Posiflex Inc. USB TOUCH V390"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value   2184
      Min        0
      Max     4095
    Event code 1 (Y)
      Value   3801
      Min        0
      Max     4095
  Event type 4 (Misc)
    Event code 4 (ScanCode)
Testing ... (interrupt to exit)

Event: time 1371798299.337455, type 3 (Absolute), code 0 (X), value 1596
Event: time 1371798299.337455, type 3 (Absolute), code 1 (Y), value 1969
Event: time 1371798299.337455, -------------- Report Sync ------------


There is no indication of pressure, so X is moving the cursor, but not
reporting anything pressed. With 2.6.35.4, there was a LeftBtn event
sent with each report block. Now it's gone.

What to do to make it work again?


Kind regards

	Jan

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

* Re: Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4
  2013-06-19  7:12 Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4 Jan Kandziora
@ 2013-06-19  7:50 ` Benjamin Tissoires
       [not found]   ` <51C17882.4050206@gmx.de>
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Tissoires @ 2013-06-19  7:50 UTC (permalink / raw)
  To: Jan Kandziora; +Cc: linux-input

Hi Jan,

On Wed, Jun 19, 2013 at 9:12 AM, Jan Kandziora <jjj@gmx.de> wrote:
> Hello,
>
> I have a Posiflex 7215 POS system which has a USB touchscreen controller
> onboard. I've done a kernel update from 2.6.35.4 to 3.9.4 and the touch
> stopped working correctly. I tried with the generic usb hid driver, the
> usbtouchscreen driver doesn't support this usb id. Evtest says:
>

If your device is handled through hid-generic, it should be easy to
debug it remotely.

>
> # evtest /dev/input/event4
> Input driver version is 1.0.1
> Input device ID: bus 0x3 vendor 0xd3a product 0xa000 version 0x110
> Input device name: "Posiflex Inc. USB TOUCH V390"
> Supported events:
>   Event type 0 (Sync)
>   Event type 1 (Key)
>     Event code 272 (LeftBtn)
>     Event code 273 (RightBtn)
>     Event code 274 (MiddleBtn)
>   Event type 3 (Absolute)
>     Event code 0 (X)
>       Value   2184
>       Min        0
>       Max     4095
>     Event code 1 (Y)
>       Value   3801
>       Min        0
>       Max     4095
>   Event type 4 (Misc)
>     Event code 4 (ScanCode)
> Testing ... (interrupt to exit)
>
> Event: time 1371798299.337455, type 3 (Absolute), code 0 (X), value 1596
> Event: time 1371798299.337455, type 3 (Absolute), code 1 (Y), value 1969
> Event: time 1371798299.337455, -------------- Report Sync ------------
>
>
> There is no indication of pressure, so X is moving the cursor, but not
> reporting anything pressed. With 2.6.35.4, there was a LeftBtn event
> sent with each report block. Now it's gone.
>

Ok, I will need at least the dmesg log and the output of hid-recorder
[1] if your device is handled through hid-generic.
Hid-replay will then allow me to virtually plug your device on my
laptop so that I can replay and find out why the btn_left events are
not emitted anymore.

Cheers,
Benjamin

[1] http://bentiss.github.io/hid-replay-docs/

> What to do to make it work again?
>
>
> Kind regards
>
>         Jan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4
       [not found]   ` <51C17882.4050206@gmx.de>
@ 2013-06-19 15:56     ` Benjamin Tissoires
  2013-06-19 16:42       ` Jan Kandziora
  2013-06-19 21:54       ` Jiri Kosina
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Tissoires @ 2013-06-19 15:56 UTC (permalink / raw)
  To: Jan Kandziora, linux-input, Jiri Kosina

Hi Jan,

On 06/19/2013 11:23 AM, Jan Kandziora wrote:
> Am 19.06.2013 09:50, schrieb Benjamin Tissoires:
>>
>> Ok, I will need at least the dmesg log and the output of hid-recorder
>> [1] if your device is handled through hid-generic.
>> Hid-replay will then allow me to virtually plug your device on my
>> laptop so that I can replay and find out why the btn_left events are
>> not emitted anymore.
>>
> Logs are attached. I've first pressed onto the center of the touch, then
> onto the lower right corner, then drawn a wave line from upper left to
> lower left, then from lower left to upper right.
> 
> Thanks for your help.
> 
> 	Jan
> 

Thanks for the logs. The problem comes from a commit introduced in 3.3 which discards the BTN_LEFT information.

If possible, can you apply and test the following patch?

Cheers,
Benjamin

From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Wed, 19 Jun 2013 17:49:05 +0200
Subject: [PATCH] HID: input: fix false positive out of range values

Commit 6da7066906e977d42104a859c490f5f9a300488c introduced in 3.3
"HID: ignore absolute values which don't fit between logical min and max"
prevents some Posiflex touch screen to work because they do not provide
logical min and max for their buttons.
Thus, logical min and max are at 0, discarding the buttons events, and
preventing the device to report appropriate X Y.

Adding a check on "min < max" solves the problem.

Reported-by: Jan Kandziora <jjj@gmx.de>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/hid/hid-input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index c526a3c..930f1bb 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1045,6 +1045,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
 	 * section 5.10 and 6.2.25
 	 */
 	if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
+	    (field->logical_minimum < field->logical_maximum) &&
 	    (value < field->logical_minimum ||
 	     value > field->logical_maximum)) {
 		dbg_hid("Ignoring out-of-range value %x\n", value);
-- 
1.8.2.1


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

* Re: Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4
  2013-06-19 15:56     ` Benjamin Tissoires
@ 2013-06-19 16:42       ` Jan Kandziora
  2013-06-19 21:54       ` Jiri Kosina
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Kandziora @ 2013-06-19 16:42 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input, Jiri Kosina

Am 19.06.2013 17:56, schrieb Benjamin Tissoires:
> 
> Thanks for the logs. The problem comes from a commit introduced in 3.3 which discards the BTN_LEFT information.
> 
> If possible, can you apply and test the following patch?
> 
It works. Many thanks for making a patch that quick.

Kind regards

	Jan

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

* Re: Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4
  2013-06-19 15:56     ` Benjamin Tissoires
  2013-06-19 16:42       ` Jan Kandziora
@ 2013-06-19 21:54       ` Jiri Kosina
  1 sibling, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2013-06-19 21:54 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Jan Kandziora, linux-input, Jiri Kosina

On Wed, 19 Jun 2013, Benjamin Tissoires wrote:

> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Date: Wed, 19 Jun 2013 17:49:05 +0200
> Subject: [PATCH] HID: input: fix false positive out of range values
> 
> Commit 6da7066906e977d42104a859c490f5f9a300488c introduced in 3.3
> "HID: ignore absolute values which don't fit between logical min and max"
> prevents some Posiflex touch screen to work because they do not provide
> logical min and max for their buttons.
> Thus, logical min and max are at 0, discarding the buttons events, and
> preventing the device to report appropriate X Y.
> 
> Adding a check on "min < max" solves the problem.
> 
> Reported-by: Jan Kandziora <jjj@gmx.de>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Thanks. I am applying this with Jan's Tested-by: (and I am also extending 
the comnent preceeding the condition to better explain this case).

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2013-06-19 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19  7:12 Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4 Jan Kandziora
2013-06-19  7:50 ` Benjamin Tissoires
     [not found]   ` <51C17882.4050206@gmx.de>
2013-06-19 15:56     ` Benjamin Tissoires
2013-06-19 16:42       ` Jan Kandziora
2013-06-19 21:54       ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.