Hi Alexander,

thanks for these hints and the diff.  I think if we add those
ic types, pms should also identify the models with hardware
buttons properly (not all v4 models are clickpads). This looks
like a trivial extension, I will propose a patch soon.

On 8/11/19 6:55 PM, Alexander Cronheim wrote:
> A little more information after looking around a bit.
> 
> The linux [1] and freebsd [2] drivers accept all elantech touchpads
> with ic types from 6 up to 15 as using the v4 protocol.
> 
> The following patch extends the accepted ic types to that
> range (from the current set consisting of 6, 8, and 15).
> 
> I cannot, however, test touchpads with ic types other than 13.
> 
> 1. 
> https://github.com/torvalds/linux/commit/10d900303f1c3a821eb0bef4e7b7ece16768fba4#diff-e91bc4802c6797fe9acbdca0ed240be9
> 2. 
> https://github.com/freebsd/freebsd/commit/8b5fc46c359e276d4545b531a3d3eb15762d1783#diff-fac99891d1c5da0f566dbcc68ba62b22
> 
> Index: pms.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pckbc/pms.c,v
> retrieving revision 1.88
> diff -u -p -r1.88 pms.c
> --- pms.c     26 Jan 2019 11:57:21 -0000      1.88
> +++ pms.c     11 Aug 2019 16:36:30 -0000
> @@ -1945,9 +1945,7 @@ elantech_get_hwinfo_v4(struct pms_softc 
>       if (synaptics_query(sc, ELANTECH_QUE_FW_VER, &fw_version))
>               return (-1);
>  
> -     if ((fw_version & 0x0f0000) >> 16 != 6
> -         && (fw_version & 0x0f0000) >> 16 != 8
> -         && (fw_version & 0x0f0000) >> 16 != 15)
> +     if ((fw_version & 0x0f0000) >> 16 < 6)
>               return (-1);
>  
>       elantech->fw_version = fw_version;
> 
> 

Reply via email to