Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: add user selectable option for the whole USB Type-C Support

It is more clear from user perspective to wrap the whole USB
Type-C support under a single option that the user can
select, then it is to always ask the user for every USB
Type-C and USB Power Delivery driver separately.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Heikki Krogerus and committed by
Greg Kroah-Hartman
a7c42106 4fbd8d19

+46 -9
+46 -8
drivers/usb/typec/Kconfig
··· 1 1 2 - menu "USB Power Delivery and Type-C drivers" 2 + menuconfig TYPEC 3 + tristate "USB Type-C Support" 4 + help 5 + USB Type-C Specification defines a cable and connector for USB where 6 + only one type of plug is supported on both ends, i.e. there will not 7 + be Type-A plug on one end of the cable and Type-B plug on the other. 8 + Determination of the host-to-device relationship happens through a 9 + specific Configuration Channel (CC) which goes through the USB Type-C 10 + cable. The Configuration Channel may also be used to detect optional 11 + Accessory Modes - Analog Audio and Debug - and if USB Power Delivery 12 + is supported, the Alternate Modes, where the connector is used for 13 + something else then USB communication. 3 14 4 - config TYPEC 5 - tristate 15 + USB Power Delivery Specification defines a protocol that can be used 16 + to negotiate the voltage and current levels with the connected 17 + partners. USB Power Delivery allows higher voltages then the normal 18 + 5V, up to 20V, and current up to 5A over the cable. The USB Power 19 + Delivery protocol is also used to negotiate the optional Alternate 20 + Modes when they are supported. USB Power Delivery does not depend on 21 + USB Type-C connector, however it is mostly used together with USB 22 + Type-C connectors. 23 + 24 + USB Type-C and USB Power Delivery Specifications define a set of state 25 + machines that need to be implemented in either software or firmware. 26 + Simple USB Type-C PHYs, for example USB Type-C Port Controller 27 + Interface Specification compliant "Port Controllers" need the state 28 + machines to be handled in the OS, but stand-alone USB Type-C and Power 29 + Delivery controllers handle the state machines inside their firmware. 30 + The USB Type-C and Power Delivery controllers usually function 31 + autonomously, and do not necessarily require drivers. 32 + 33 + Enable this configurations option if you have USB Type-C connectors on 34 + your system and 1) you know your USB Type-C hardware requires OS 35 + control (a driver) to function, or 2) if you need to be able to read 36 + the status of the USB Type-C ports in your system, or 3) if you need 37 + to be able to swap the power role (decide are you supplying or 38 + consuming power over the cable) or data role (host or device) when 39 + both roles are supported. 40 + 41 + For more information, see the kernel documentation for USB Type-C 42 + Connector Class API (Documentation/driver-api/usb/typec.rst) 43 + <https://www.kernel.org/doc/html/latest/driver-api/usb/typec.html> 44 + and ABI (Documentation/ABI/testing/sysfs-class-typec). 45 + 46 + if TYPEC 6 47 7 48 config TYPEC_TCPM 8 49 tristate "USB Type-C Port Controller Manager" 9 50 depends on USB 10 - select TYPEC 11 51 help 12 52 The Type-C Port Controller Manager provides a USB PD and USB Type-C 13 53 state machine for use with Type-C Port Controllers. ··· 62 22 depends on INTEL_SOC_PMIC 63 23 depends on INTEL_PMC_IPC 64 24 depends on BXT_WC_PMIC_OPREGION 65 - select TYPEC 66 25 help 67 26 This driver adds support for USB Type-C detection on Intel Broxton 68 27 platforms that have Intel Whiskey Cove PMIC. The driver can detect the ··· 70 31 To compile this driver as module, choose M here: the module will be 71 32 called typec_wcove 72 33 73 - endif 34 + endif # TYPEC_TCPM 74 35 75 36 source "drivers/usb/typec/ucsi/Kconfig" 76 37 77 38 config TYPEC_TPS6598X 78 39 tristate "TI TPS6598x USB Power Delivery controller driver" 79 40 depends on I2C 80 - select TYPEC 81 41 help 82 42 Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power 83 43 Delivery controller. ··· 84 46 If you choose to build this driver as a dynamically linked module, the 85 47 module will be called tps6598x.ko. 86 48 87 - endmenu 49 + endif # TYPEC
-1
drivers/usb/typec/ucsi/Kconfig
··· 1 1 config TYPEC_UCSI 2 2 tristate "USB Type-C Connector System Software Interface driver" 3 3 depends on !CPU_BIG_ENDIAN 4 - select TYPEC 5 4 help 6 5 USB Type-C Connector System Software Interface (UCSI) is a 7 6 specification for an interface that allows the operating system to