linux/drivers/usb/typec
Heikki Krogerus 1a2f474d32 usb: typec: tps6598x: handle block reads separately with plain-I2C adapters
If the I2C adapter that the PD controller is attached to
does not support SMBus protocol, the driver needs to handle
block reads separately. The first byte returned in block
read protocol will show the total number of bytes. It needs
to be stripped away.

This is handled separately in the driver only because right
now we have no way of requesting the used protocol with
regmap-i2c. This is in practice a workaround for what is
really a problem in regmap-i2c. The other option would have
been to register custom regmap, or not use regmap at all,
however, since the solution is very simple, I choose to use
it in this case for convenience. It is easy to remove once
we figure out how to handle this kind of cases in
regmap-i2c.

Fixes: 0a4c005bd1 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 10:55:31 -07:00
..
fusb302 usb: typec: tcpm: Use new Type-C switch/mux and usb-role-switch functions 2018-03-22 13:40:10 +01:00
mux usb: typec: driver for Pericom PI3USB30532 Type-C cross switch 2018-03-22 13:49:28 +01:00
ucsi usb: typec: ucsi: Increase command completion timeout value 2018-04-22 14:54:50 +02:00
Kconfig usb: typec: driver for Pericom PI3USB30532 Type-C cross switch 2018-03-22 13:49:28 +01:00
Makefile usb: typec: driver for Pericom PI3USB30532 Type-C cross switch 2018-03-22 13:49:28 +01:00
class.c usb: typec: Separate the definitions for data and power roles 2018-03-22 13:40:10 +01:00
mux.c usb: typec: API for controlling USB Type-C Multiplexers 2018-03-22 13:40:10 +01:00
tcpm.c usb: typec: tcpm: Release the role mux when exiting 2018-05-03 10:55:27 -07:00
tps6598x.c usb: typec: tps6598x: handle block reads separately with plain-I2C adapters 2018-05-03 10:55:31 -07:00
typec_wcove.c usb: typec: Separate the definitions for data and power roles 2018-03-22 13:40:10 +01:00