Re: [PATCH] Add generic driver for Silead tochscreens

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

 



On Thu, Jul 16, 2015 at 4:59 PM, Gregor Riepl <onitake@xxxxxxxxx> wrote:
> Please excuse me if I'm being to brash. I'd love to see complete Silead
> touchscreen controller support in the mainline kernel, but with the hardware
> being what it is and the lack of complete public documentation, I understand
> this is a bit difficult.
>
>> /* The last 4 bits are the touch id */
>> id = buf[offset + SILEAD_POINT_ID_OFF] & SILEAD_TOUCH_ID_MASK;
>>
>> /* The 1st 4 bits are part of X */
>> buf[offset + SILEAD_POINT_ID_OFF] =
>>       (buf[offset + SILEAD_POINT_ID_OFF] & SILEAD_X_HSB_MASK)
>>       >> 4;
>>
>> y = le16_to_cpup((__le16 *)(buf + offset));
>> x = le16_to_cpup((__le16 *)(buf + offset + SILEAD_POINT_X_OFF));
>
> Can you confirm that your data sheet/hardware does in fact use the lower 4
> bits of byte 3 of each point record as the touch id, and not the upper 4 bits?
>
> I just checked, both the Basewin driver (and all drivers derived from it) and
> my testing hardware attribute it to the high nibble. The lower nibble is part
> of the x coordinate.
>
> Aside from this, would you be interested in making your driver compatible with
> legacy/"broken" hardware? I'd start working on a patch if this is ok to you.
>
> This would encompass the following:
> - Adding fallbacks for unavailable information (width, height, number of touch
> points, finger tracking availability, axis swapping and mirroring, firmware
> name), maybe keeping the device uninitialized until all parameters are set

axis swapping, mirroring sound like a good addon.
there is currently support for width, height, number of touch points
and firmware name

> - Adding a sysfs interface and/or module options to set these attributes, or
> possibly adding platform quirks that autoconfigurate depending on DMI data
> (better ideas are welcome)

IMHO it's not a good idea to do the config using sysfs.

> - Adding code paths for the missing functionality (finger tracking,
> swapping/mirroring, other quirks)

I am not sure I think  Dmitry could answer this one.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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