summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-usbc-tusb320.c
AgeCommit message (Collapse)AuthorFilesLines
2022-09-26extcon: usbc-tusb320: fix kernel-doc warningRong Chen1-1/+1
Fix the warning: drivers/extcon/extcon-usbc-tusb320.c:19: warning: expecting prototype for drivers/extcon/extcon-tusb320.c(). Prototype was for TUSB320_REG8() instead Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Rong Chen <rong.a.chen@intel.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2022-09-26extcon: usbc-tusb320: Add USB TYPE-C supportMarek Vasut1-0/+159
The TI TUSB320 seems like a better fit for USB TYPE-C subsystem, which can expose details collected by the TUSB320 in a far more precise way than extcon. Since there are existing users in the kernel and in DT which depend on the extcon interface, keep it for now. Add TYPE-C interface and expose the supported supply current, direction and connector polarity via the TYPE-C interface. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2022-09-26extcon: usbc-tusb320: Factor out extcon into dedicated functionsMarek Vasut1-29/+46
Move extcon code into separate functions in preparation for addition of USB TYPE-C support. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2021-10-27extcon: usbc-tusb320: Add support for TUSB320LYassine Oudjana1-3/+79
TUSB320L is a newer chip with additional features, and it has additional steps in its mode changing sequence: - Disable CC state machine, - Write to mode register, - Wait for 5 ms, - Re-enable CC state machine. It also has an additional register that a revision number can be read from. Add support for the mode changing sequence, and read the revision number during probe and print it as info. Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2021-10-27extcon: usbc-tusb320: Add support for mode setting and resetYassine Oudjana1-4/+81
Reset the chip and set its mode to default (maintain mode set by PORT pin) during probe to make sure it comes up in the default state. Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2020-12-11extcon: Add driver for TI TUSB320Michael Auchter1-0/+184
This patch adds an extcon driver for the TI TUSB320 USB Type-C device. This can be used to detect whether the port is configured as a downstream or upstream facing port. Signed-off-by: Michael Auchter <michael.auchter@ni.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>