mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-19 17:11:03 +00:00
da4b5d18dd
If CONFIG_TYPEC_HD3SS3220=y, CONFIG_USB_ROLE_SWITCH=m, below errors
can be found:
drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_remove':
hd3ss3220.c:(.text+0x64): undefined reference to `usb_role_switch_put'
drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_dr_set':
hd3ss3220.c:(.text+0x154): undefined reference to `usb_role_switch_set_role'
drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_set_role':
hd3ss3220.c:(.text+0x294): undefined reference to `usb_role_switch_set_role'
hd3ss3220.c:(.text+0x2f4): undefined reference to `usb_role_switch_set_role'
hd3ss3220.c:(.text+0x348): undefined reference to `usb_role_switch_set_role'
hd3ss3220.c:(.text+0x390): undefined reference to `usb_role_switch_set_role'
drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_probe':
hd3ss3220.c:(.text+0x5e8): undefined reference to `fwnode_usb_role_switch_get'
hd3ss3220.c:(.text+0x8a4): undefined reference to `usb_role_switch_put'
make: *** [vmlinux] Error 1
This patch add dependency USB_ROLE_SWITCH for TYPEC_HD3SS3220.
Fixes: 1c48c759ef
("usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Link: https://lore.kernel.org/r/20191009014707.38716-1-maowenan@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
79 lines
3.3 KiB
Text
79 lines
3.3 KiB
Text
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
menuconfig TYPEC
|
|
tristate "USB Type-C Support"
|
|
help
|
|
USB Type-C Specification defines a cable and connector for USB where
|
|
only one type of plug is supported on both ends, i.e. there will not
|
|
be Type-A plug on one end of the cable and Type-B plug on the other.
|
|
Determination of the host-to-device relationship happens through a
|
|
specific Configuration Channel (CC) which goes through the USB Type-C
|
|
cable. The Configuration Channel may also be used to detect optional
|
|
Accessory Modes - Analog Audio and Debug - and if USB Power Delivery
|
|
is supported, the Alternate Modes, where the connector is used for
|
|
something else then USB communication.
|
|
|
|
USB Power Delivery Specification defines a protocol that can be used
|
|
to negotiate the voltage and current levels with the connected
|
|
partners. USB Power Delivery allows higher voltages then the normal
|
|
5V, up to 20V, and current up to 5A over the cable. The USB Power
|
|
Delivery protocol is also used to negotiate the optional Alternate
|
|
Modes when they are supported. USB Power Delivery does not depend on
|
|
USB Type-C connector, however it is mostly used together with USB
|
|
Type-C connectors.
|
|
|
|
USB Type-C and USB Power Delivery Specifications define a set of state
|
|
machines that need to be implemented in either software or firmware.
|
|
Simple USB Type-C PHYs, for example USB Type-C Port Controller
|
|
Interface Specification compliant "Port Controllers" need the state
|
|
machines to be handled in the OS, but stand-alone USB Type-C and Power
|
|
Delivery controllers handle the state machines inside their firmware.
|
|
The USB Type-C and Power Delivery controllers usually function
|
|
autonomously, and do not necessarily require drivers.
|
|
|
|
Enable this configurations option if you have USB Type-C connectors on
|
|
your system and 1) you know your USB Type-C hardware requires OS
|
|
control (a driver) to function, or 2) if you need to be able to read
|
|
the status of the USB Type-C ports in your system, or 3) if you need
|
|
to be able to swap the power role (decide are you supplying or
|
|
consuming power over the cable) or data role (host or device) when
|
|
both roles are supported.
|
|
|
|
For more information, see the kernel documentation for USB Type-C
|
|
Connector Class API (Documentation/driver-api/usb/typec.rst)
|
|
<https://www.kernel.org/doc/html/latest/driver-api/usb/typec.html>
|
|
and ABI (Documentation/ABI/testing/sysfs-class-typec).
|
|
|
|
if TYPEC
|
|
|
|
source "drivers/usb/typec/tcpm/Kconfig"
|
|
|
|
source "drivers/usb/typec/ucsi/Kconfig"
|
|
|
|
config TYPEC_HD3SS3220
|
|
tristate "TI HD3SS3220 Type-C DRP Port controller driver"
|
|
depends on I2C
|
|
depends on USB_ROLE_SWITCH
|
|
help
|
|
Say Y or M here if your system has TI HD3SS3220 Type-C DRP Port
|
|
controller driver.
|
|
|
|
If you choose to build this driver as a dynamically linked module, the
|
|
module will be called hd3ss3220.ko.
|
|
|
|
config TYPEC_TPS6598X
|
|
tristate "TI TPS6598x USB Power Delivery controller driver"
|
|
depends on I2C
|
|
select REGMAP_I2C
|
|
help
|
|
Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power
|
|
Delivery controller.
|
|
|
|
If you choose to build this driver as a dynamically linked module, the
|
|
module will be called tps6598x.ko.
|
|
|
|
source "drivers/usb/typec/mux/Kconfig"
|
|
|
|
source "drivers/usb/typec/altmodes/Kconfig"
|
|
|
|
endif # TYPEC
|