Skip to contentSkip to conversation

Posiflex 0d3a:a000 touchscreen press not recognized in kernel 3.9.4

DISCUSSION Jan Kandziora 3 participants 5 messages Jun 19, 2013 1 message not in the archive HID

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Hi Jan,

Quoted 7 lines · Jan Kandziora

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.

Quoted 24 lines
# 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)
Quoted 9 lines

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/

Quoted 10 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi Jan,

Quoted 8 lines · Jan Kandziora

Am 19.06.2013 09:50, schrieb Benjamin Tissoires:

Quoted 7 lines

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.

Quoted 8 lines

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 <[email protected]>
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.

---
 drivers/hid/hid-input.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/hid-input.c +1 -0
index c526a3c..930f1bb 100644
@@ -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);
Signature · 1 line
1.8.2.1
#4 lore raw

Am 19.06.2013 17:56, schrieb Benjamin Tissoires:

Quoted 5 lines

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

#5 lore raw
In reply to Benjamin Tissoires
Quoted 11 lines · Benjamin Tissoires

From: Benjamin Tissoires <[email protected]>
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.

Quoted 4 lines

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

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).

Signature · 2 lines
Jiri Kosina
SUSE Labs