Re: add support for crc_enabled Elantech v3 touchpads

2015-04-02 Thread Fasse
On Thu, 2 Apr 2015 18:51:38 +0200 Martin Pieuchot m...@openbsd.org wrote: Even if that's true, nothing prevent us to commit this diff first, as long as it does not introduce regression and then work on the possible refactoring needed to support debounce packets :) That is great to hear.

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-02 Thread Theo de Raadt
This pms driver is becoming a nightmare, full of messy code that only a few people understand all the secrets behind. Can someone out there put a serious effort into refactoring this so that there is a layer inside it, with sub-drivers for specific models? I say this, because I senes this

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-02 Thread Ulf Brosziewski
On 04/02/2015 03:39 AM, Fasse wrote: On Wed, 01 Apr 2015 21:23:15 +0200 Ulf Brosziewskiulf.brosziew...@t-online.de wrote: Yes, without some refactoring there won't be an elegant way. pms_sync_elantech_v2 encodes some sync state in the 'flags' field (ELANTECH_F_2FINGER_PACKET), but doing the

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-02 Thread Martin Pieuchot
On 02/04/15(Thu) 18:43, Ulf Brosziewski wrote: On 04/02/2015 03:39 AM, Fasse wrote: On Wed, 01 Apr 2015 21:23:15 +0200 Ulf Brosziewskiulf.brosziew...@t-online.de wrote: Yes, without some refactoring there won't be an elegant way. pms_sync_elantech_v2 encodes some sync state in the 'flags'

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-01 Thread Stefan Sperling
On Wed, Apr 01, 2015 at 05:44:16PM +0200, Fasse wrote: This diff adds support for Elantech v3 touchpads using the crc_enabled integrity check. I tested this patch with my Elantech v3 touchpad using firmware version 0x454f00, it now works correctly. Other hardware versions should not be

add support for crc_enabled Elantech v3 touchpads

2015-04-01 Thread Fasse
This diff adds support for Elantech v3 touchpads using the crc_enabled integrity check. I tested this patch with my Elantech v3 touchpad using firmware version 0x454f00, it now works correctly. Other hardware versions should not be affected by this change. I could not check if this introduces

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-01 Thread Fasse
On Wed, 01 Apr 2015 20:05:46 +0200 Ulf Brosziewski ulf.brosziew...@t-online.de wrote: Hi, there might be a problem. The Linux driver for that touchpad type also accepts debounce packets, which have the same format as for the non-crc version. I have no idea whether that is correct and if

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-01 Thread Fasse
On Wed, 1 Apr 2015 18:02:59 +0200 Stefan Sperling s...@stsp.name wrote: Interesting, thanks. If you don't hear from anyone else about this please ask me again in a week from now. I can test on v3 hardware by then but not any earlier. Please write this as if-else instead of switch: @@

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-01 Thread Ulf Brosziewski
On 04/01/2015 08:46 PM, Fasse wrote: On Wed, 01 Apr 2015 20:05:46 +0200 Ulf Brosziewskiulf.brosziew...@t-online.de wrote: Hi, there might be a problem. The Linux driver for that touchpad type also accepts debounce packets, which have the same format as for the non-crc version. I have no idea

Re: add support for crc_enabled Elantech v3 touchpads

2015-04-01 Thread Ulf Brosziewski
Hi, there might be a problem. The Linux driver for that touchpad type also accepts debounce packets, which have the same format as for the non-crc version. I have no idea whether that is correct and if those packets do occur in practice, but if they do they wouldn't pass this version of sync()