The solution of touch screen failure based on Eeti touch screen controller under Linux

Source: Internet
Author: User

Linux (kernel 3.2.x), based on the Eeti Touch screen controller, USB touch screen application, found that the USB touch cable unplugged and plugged in, touch screen failure, the touch screen driver EGTOUHD CPU soared, occupancy rate of more than 90%.

Check the touch screen device, found that the USB touch cable unplugged,/dev/hidraw still exist, not in time to remove, then plug in the USB touch line, will appear in/dev under the hidraw0 device. So judging the point of failure is here: After the USB touch cable is unplugged, the touch device does not actually exist, but the presence of/dev/hidraw makes EGTOUHD think the touch device is still present, reading the/dev/hidraw, instead of reading the new device number that was generated after reseating/dev/ Hidraw1.

Run Udevadm--monitor and found that the kernel did not issue the remove device information when unplugging the USB touch cable.

      After you find a document from Kernel.org's official website and change the position of device_destory execution in drivers/hid/hidraw.c, the question Hu, the following changes are made:

index cb0137b. Ab24ce2 100644
---A/DRIVERS/HID/HIDRAW.C
+++ b/drivers/hid/hidraw.c

@@ -320,13 +320,13 @@ -320,13 void drop_ref (struct hidraw *hidraw, int exists_bit)

Hid_hw_close (Hidraw->hid);

Wake_up_interruptible (&hidraw->wait);

}

+ Device_destroy (Hidraw_class,

+ MKDEV (hidraw_major, Hidraw->minor));

} else {

--hidraw->open;

}

if (!hidraw->open) {

if (!hidraw->exist) {

-Device_destroy (Hidraw_class,

-MKDEV (Hidraw_major, Hidraw->minor));

Hidraw_table[hidraw->minor] = NULL;

Kfree (Hidraw);

} else {

Reference Documentation:

Https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/hid/hidraw.c?id= 47587fc098451c2100dc1fb618855fc2e2d937af


The solution of touch screen failure based on Eeti touch screen controller under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.