Skip to content

Commit

Permalink
usb: typec: add TUSB320xA driver
Browse files Browse the repository at this point in the history
The TUSB320LA and TUSB320HA (or LAI, HAI) chips are I2C controlled
non-PD Type-C port controllers. They support detection of cable
orientation, port attachment state, and role, including Audio Accessory
and Debug Accessory modes. Add a typec class driver for this family.

Note that there already exists an extcon driver for the TUSB320 (a
slightly older revision that does not support setting role preference or
disabling the CC state machine). This driver is loosely based on that
one.

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
  • Loading branch information
sipraga authored and intel-lab-lkp committed Mar 1, 2022
1 parent 73eb760 commit c60eb90
Show file tree
Hide file tree
Showing 3 changed files with 530 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/usb/typec/Kconfig
Expand Up @@ -75,6 +75,18 @@ config TYPEC_HD3SS3220
If you choose to build this driver as a dynamically linked module, the
module will be called hd3ss3220.ko.

config TYPEC_TUSB320XA
tristate "TI TUSB320xA Type-C DRP Port controller driver"
depends on USB_ROLE_SWITCH
depends on I2C
select REGMAP_I2C
help
Say Y or M here if your system has a TUSB320xA Type-C DRP port
controller.

If you choose to build this driver as a dynamically linked module, the
module will be called tusb320xa.ko.

config TYPEC_STUSB160X
tristate "STMicroelectronics STUSB160x Type-C controller driver"
depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/typec/Makefile
Expand Up @@ -7,6 +7,7 @@ obj-$(CONFIG_TYPEC_TCPM) += tcpm/
obj-$(CONFIG_TYPEC_UCSI) += ucsi/
obj-$(CONFIG_TYPEC_TPS6598X) += tipd/
obj-$(CONFIG_TYPEC_HD3SS3220) += hd3ss3220.o
obj-$(CONFIG_TYPEC_TUSB320XA) += tusb320xa.o
obj-$(CONFIG_TYPEC_QCOM_PMIC) += qcom-pmic-typec.o
obj-$(CONFIG_TYPEC_STUSB160X) += stusb160x.o
obj-$(CONFIG_TYPEC_RT1719) += rt1719.o
Expand Down

0 comments on commit c60eb90

Please sign in to comment.