Improving imx_keypad response time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Alberto,

we are using the imx_keypad driver in our project (i.MX6Q), and it does work well enough, but the keys seem a bit slow to respond.

I checked the source code, and the minimum time for a key press+release seems to be 2+3*10 (key press event) + 60 + 3*10 (key release event) = 122 ms, assuming that the key release happens in the 60 ms interval. In practice, it is more like 200 ms, due to scheduling delays (I ran some tests).

If you press and release a key fast enough (faster than 70 ms on our system, and I can do that pretty easily), no input events are fired at all.

I would like to improve the driver, but I got some questions about its design first (I don't want to walk into any traps); can you help me there?

a) Is there a reason why the driver waits 10 ms between keypad matrix scans? The i.MX6Q reference manual says: "The process is repeated several times in succession [...]. When several (3 or 4) consecutive scans yield the same key closures, a valid key press has been detected." The RM does not say how long the debouncing interval should be, though; how did you arrive at 10 ms?

b) Is there a reason why the Keypad Release Interrupt is not used (and the driver polls every 60 ms instead)? Is it because of some i.MX6Q erratum? I checked the errata, but didn't find anything.

Best regards,
Thomas Betker




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux