Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0690a25 authored by Guenter Roeck's avatar Guenter Roeck Committed by Greg Kroah-Hartman
Browse files

staging: typec: USB Type-C Port Manager (tcpm)



This driver implements the USB Type-C Power Delivery state machine
for both source and sink ports. Alternate mode support is not
fully implemented.

The driver attaches to the USB Type-C class code implemented in
the following patches.

	usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY
	usb: USB Type-C connector class

This driver only implements the state machine. Lower level drivers are
responsible for
- Reporting VBUS status and activating VBUS
- Setting CC lines and providing CC line status
- Setting line polarity
- Activating and deactivating VCONN
- Setting the current limit
- Activating and deactivating PD message transfers
- Sending and receiving PD messages

The driver provides both a functional API as well as callbacks for
lower level drivers.

Signed-off-by: default avatarGuenter Roeck <groeck@chromium.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d852ed98
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -104,4 +104,6 @@ source "drivers/staging/vc04_services/Kconfig"

source "drivers/staging/bcm2835-audio/Kconfig"

source "drivers/staging/typec/Kconfig"

endif # STAGING
+1 −1
Original line number Diff line number Diff line
# Makefile for staging directory

obj-y				+= media/
obj-y				+= typec/
obj-$(CONFIG_PRISM2_USB)	+= wlan-ng/
obj-$(CONFIG_COMEDI)		+= comedi/
obj-$(CONFIG_FB_OLPC_DCON)	+= olpc_dcon/
@@ -41,4 +42,3 @@ obj-$(CONFIG_KS7010) += ks7010/
obj-$(CONFIG_GREYBUS)		+= greybus/
obj-$(CONFIG_BCM2835_VCHIQ)	+= vc04_services/
obj-$(CONFIG_SND_BCM2835)	+= bcm2835-audio/
+11 −0
Original line number Diff line number Diff line
menu "USB Power Delivery and Type-C drivers"

config TYPEC_TCPM
	tristate "USB Type-C Port Controller Manager"
	depends on USB
	select TYPEC
	help
	  The Type-C Port Controller Manager provides a USB PD and USB Type-C
	  state machine for use with Type-C Port Controllers.

endmenu
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_TYPEC_TCPM)	+= tcpm.o
+12 −0
Original line number Diff line number Diff line
tcpm:
- Add documentation (at the very least for the API to low level drivers)
- Split PD code into separate file
- Check if it makes sense to use tracepoints instead of debugfs for debug logs
- Implement Alternate Mode handling
- Address "#if 0" code if not addressed with the above
- Validate all comments marked with "XXX"; either address or remove comments
- Add support for USB PD 3.0. While not mandatory, at least fast role swap
  as well as authentication support would be very desirable.

Please send patches to Guenter Roeck <linux@roeck-us.net> and copy
Heikki Krogerus <heikki.krogerus@linux.intel.com>.
Loading