usb: typec: tcpci: Add support when hidden tx registers are inaccessible
authorBadhri Jagan Sridharan <badhri@google.com>
Tue, 1 Sep 2020 02:59:15 +0000 (19:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Sep 2020 11:03:46 +0000 (13:03 +0200)
commit19b65476839ed9e292237888f74551aee4600c7f
treebfeb27648501842eb76f926e8f8ddaf058d530d8
parent492c1dc9d0a1c61f26f1804c73633ae96a9f1605
usb: typec: tcpci: Add support when hidden tx registers are inaccessible

TCPCI spec forbids direct access of TX_BUF_BYTE_x register.
The existing version of tcpci driver assumes that those registers
are directly addressible. Add support for tcpci chips which do
not support direct access to TX_BUF_BYTE_x registers. TX_BUF_BYTE_x
can only be accessed by I2C_WRITE_BYTE_COUNT.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20200901025927.3596190-3-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpci.c
drivers/usb/typec/tcpm/tcpci.h