mbox series

[RFC,0/4] input: edt-ft5x06: add support for DFROBOT touch controller to

Message ID 20211216233041.1220-1-tharvey@gateworks.com (mailing list archive)
Headers show
Series input: edt-ft5x06: add support for DFROBOT touch controller to | expand

Message

Tim Harvey Dec. 16, 2021, 11:30 p.m. UTC
The DFROBOT DFR0678 [1] and DFR0550 [2] touchscreen displays are meant
to be compatible with the official RaspberryPi 7in display. However
instead of directly conntecting the FT5x06 touch controller to the I2C
bus going to the host processor they route it through an MCU and emulate
a virtual FT5x06 controller but don't do a very good job at it. The
method the RaspberryPi firmware used to read the touch data is supported
(which consists of reading R2 to get the number of touch points, then
reading 4 bytes of data for each point in discrete I2C transactions. If
you try to use the FT5x06 driver which reads all registers starting at
R0 at once you will get invalid point data.

Additionally the RaspberryPi displays like these do not have a touch
controller IRQ so polling mode has to be added.

Also additionally these controllers do not appear to send UP events so
an additional patch slightly modified from the raspberry-pi kernel is used
to  track ID's and report up events.

I'm sending this series as an RFC as I'm not really clear if this is the
best approach vs just adding a new touchscreen driver (which I have
prepared and will probably send in another RFC).

Tim
[1] - https://www.dfrobot.com/product-2193.html
[2] - https://www.dfrobot.com/product-1784.html

Tim Harvey (4):
  dt-bindings: input: touchscreen: edt-ft5x06: add poll-interval
  input: edt-ft5x06 - add polled input support
  input: edt-ft5x06 - add support for DFROBOT touch controllers
  input: edt-ft5x06 - Handle unreliable TOUCH_UP events

 .../input/touchscreen/edt-ft5x06.yaml         |   7 +-
 drivers/input/touchscreen/edt-ft5x06.c        | 144 ++++++++++++++----
 2 files changed, 123 insertions(+), 28 deletions(-)

Comments

Tim Harvey Jan. 21, 2022, 5:24 p.m. UTC | #1
On Thu, Dec 16, 2021 at 3:30 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> The DFROBOT DFR0678 [1] and DFR0550 [2] touchscreen displays are meant
> to be compatible with the official RaspberryPi 7in display. However
> instead of directly conntecting the FT5x06 touch controller to the I2C
> bus going to the host processor they route it through an MCU and emulate
> a virtual FT5x06 controller but don't do a very good job at it. The
> method the RaspberryPi firmware used to read the touch data is supported
> (which consists of reading R2 to get the number of touch points, then
> reading 4 bytes of data for each point in discrete I2C transactions. If
> you try to use the FT5x06 driver which reads all registers starting at
> R0 at once you will get invalid point data.
>
> Additionally the RaspberryPi displays like these do not have a touch
> controller IRQ so polling mode has to be added.
>
> Also additionally these controllers do not appear to send UP events so
> an additional patch slightly modified from the raspberry-pi kernel is used
> to  track ID's and report up events.
>
> I'm sending this series as an RFC as I'm not really clear if this is the
> best approach vs just adding a new touchscreen driver (which I have
> prepared and will probably send in another RFC).
>
> Tim
> [1] - https://www.dfrobot.com/product-2193.html
> [2] - https://www.dfrobot.com/product-1784.html
>
> Tim Harvey (4):
>   dt-bindings: input: touchscreen: edt-ft5x06: add poll-interval
>   input: edt-ft5x06 - add polled input support
>   input: edt-ft5x06 - add support for DFROBOT touch controllers
>   input: edt-ft5x06 - Handle unreliable TOUCH_UP events
>
>  .../input/touchscreen/edt-ft5x06.yaml         |   7 +-
>  drivers/input/touchscreen/edt-ft5x06.c        | 144 ++++++++++++++----
>  2 files changed, 123 insertions(+), 28 deletions(-)
>
> --

Any feedback on this?

The other approach I posted an RFC series for was to add a completely
new driver [1]

Best regards,

Tim
[1] https://patchwork.kernel.org/project/linux-input/list/?series=596975