From: Robert Dolca <robert.dolca@gmail.com>
To: Gregor Riepl <onitake@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Add generic driver for Silead tochscreens
Date: Tue, 21 Jul 2015 00:19:17 +0300 [thread overview]
Message-ID: <CAFPB+Yf=k7jtdDP1sB_8NmkqKk0rXqo3+Y8j9aPhwdBxoHh4ZA@mail.gmail.com> (raw)
In-Reply-To: <55A7B8DE.6050704@gmail.com>
On Thu, Jul 16, 2015 at 4:59 PM, Gregor Riepl <onitake@gmail.com> 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.
next prev parent reply other threads:[~2015-07-20 21:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-11 21:23 [PATCH] Add generic driver for Silead tochscreens Gregor Riepl
2015-07-12 6:31 ` Dmitry Torokhov
2015-07-13 9:59 ` Robert Dolca
2015-07-13 12:21 ` Gregor Riepl
2015-07-13 14:24 ` Gregor Riepl
2015-07-13 14:52 ` Robert Dolca
2015-07-13 15:18 ` Gregor Riepl
2015-07-16 13:59 ` Gregor Riepl
2015-07-20 21:19 ` Robert Dolca [this message]
2015-07-20 21:13 ` Robert Dolca
2015-07-21 13:21 ` Gregor Riepl
-- strict thread matches above, loose matches on Subject: below --
2015-07-10 15:11 Robert Dolca
2015-07-11 13:05 ` Paul Bolle
2015-07-20 6:51 ` Dmitry Torokhov
2015-07-20 12:05 ` Robert Dolca
2015-07-27 21:30 ` Dmitry Torokhov
2015-07-28 7:23 ` Robert Dolca
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFPB+Yf=k7jtdDP1sB_8NmkqKk0rXqo3+Y8j9aPhwdBxoHh4ZA@mail.gmail.com' \
--to=robert.dolca@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=onitake@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).