usb: typec: Group all TCPCI/TCPM code together
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Thu, 20 Sep 2018 11:23:47 +0000 (14:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Sep 2018 11:37:29 +0000 (13:37 +0200)
Moving all the drivers that depend on the Port Controller
Manager under a new directory drivers/usb/typec/tcpm/ and
making Guenter Roeck the designated reviewer of that code.

Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 files changed:
MAINTAINERS
drivers/usb/typec/Kconfig
drivers/usb/typec/Makefile
drivers/usb/typec/fusb302/Kconfig [deleted file]
drivers/usb/typec/fusb302/Makefile [deleted file]
drivers/usb/typec/tcpm/Kconfig [new file with mode: 0644]
drivers/usb/typec/tcpm/Makefile [new file with mode: 0644]
drivers/usb/typec/tcpm/fusb302.c [moved from drivers/usb/typec/fusb302/fusb302.c with 100% similarity]
drivers/usb/typec/tcpm/fusb302_reg.h [moved from drivers/usb/typec/fusb302/fusb302_reg.h with 100% similarity]
drivers/usb/typec/tcpm/tcpci.c [moved from drivers/usb/typec/tcpci.c with 100% similarity]
drivers/usb/typec/tcpm/tcpci.h [moved from drivers/usb/typec/tcpci.h with 100% similarity]
drivers/usb/typec/tcpm/tcpci_rt1711h.c [moved from drivers/usb/typec/tcpci_rt1711h.c with 100% similarity]
drivers/usb/typec/tcpm/tcpm.c [moved from drivers/usb/typec/tcpm.c with 100% similarity]
drivers/usb/typec/tcpm/wcove.c [moved from drivers/usb/typec/typec_wcove.c with 100% similarity]

index 4ece30f..9dff31e 100644 (file)
@@ -15286,6 +15286,12 @@ F:     Documentation/driver-api/usb/typec_bus.rst
 F:     drivers/usb/typec/altmodes/
 F:     include/linux/usb/typec_altmode.h
 
+USB TYPEC PORT CONTROLLER DRIVERS
+M:     Guenter Roeck <linux@roeck-us.net>
+L:     linux-usb@vger.kernel.org
+S:     Maintained
+F:     drivers/usb/typec/tcpm/
+
 USB UHCI DRIVER
 M:     Alan Stern <stern@rowland.harvard.edu>
 L:     linux-usb@vger.kernel.org
index 00878c3..30a847c 100644 (file)
@@ -45,50 +45,7 @@ menuconfig TYPEC
 
 if TYPEC
 
-config TYPEC_TCPM
-       tristate "USB Type-C Port Controller Manager"
-       depends on USB
-       select USB_ROLE_SWITCH
-       select POWER_SUPPLY
-       help
-         The Type-C Port Controller Manager provides a USB PD and USB Type-C
-         state machine for use with Type-C Port Controllers.
-
-if TYPEC_TCPM
-
-config TYPEC_TCPCI
-       tristate "Type-C Port Controller Interface driver"
-       depends on I2C
-       select REGMAP_I2C
-       help
-         Type-C Port Controller driver for TCPCI-compliant controller.
-
-config TYPEC_RT1711H
-       tristate "Richtek RT1711H Type-C chip driver"
-       depends on I2C
-       select TYPEC_TCPCI
-       help
-         Richtek RT1711H Type-C chip driver that works with
-         Type-C Port Controller Manager to provide USB PD and USB
-         Type-C functionalities.
-
-source "drivers/usb/typec/fusb302/Kconfig"
-
-config TYPEC_WCOVE
-       tristate "Intel WhiskeyCove PMIC USB Type-C PHY driver"
-       depends on ACPI
-       depends on INTEL_SOC_PMIC
-       depends on INTEL_PMC_IPC
-       depends on BXT_WC_PMIC_OPREGION
-       help
-         This driver adds support for USB Type-C detection on Intel Broxton
-         platforms that have Intel Whiskey Cove PMIC. The driver can detect the
-         role and cable orientation.
-
-         To compile this driver as module, choose M here: the module will be
-         called typec_wcove
-
-endif # TYPEC_TCPM
+source "drivers/usb/typec/tcpm/Kconfig"
 
 source "drivers/usb/typec/ucsi/Kconfig"
 
index 45b0aef..6696b72 100644 (file)
@@ -2,11 +2,7 @@
 obj-$(CONFIG_TYPEC)            += typec.o
 typec-y                                := class.o mux.o bus.o
 obj-$(CONFIG_TYPEC)            += altmodes/
-obj-$(CONFIG_TYPEC_TCPM)       += tcpm.o
-obj-y                          += fusb302/
-obj-$(CONFIG_TYPEC_WCOVE)      += typec_wcove.o
+obj-$(CONFIG_TYPEC_TCPM)       += tcpm/
 obj-$(CONFIG_TYPEC_UCSI)       += ucsi/
 obj-$(CONFIG_TYPEC_TPS6598X)   += tps6598x.o
 obj-$(CONFIG_TYPEC)            += mux/
-obj-$(CONFIG_TYPEC_TCPCI)      += tcpci.o
-obj-$(CONFIG_TYPEC_RT1711H)    += tcpci_rt1711h.o
diff --git a/drivers/usb/typec/fusb302/Kconfig b/drivers/usb/typec/fusb302/Kconfig
deleted file mode 100644 (file)
index fce099f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-config TYPEC_FUSB302
-       tristate "Fairchild FUSB302 Type-C chip driver"
-       depends on I2C
-       help
-         The Fairchild FUSB302 Type-C chip driver that works with
-         Type-C Port Controller Manager to provide USB PD and USB
-         Type-C functionalities.
diff --git a/drivers/usb/typec/fusb302/Makefile b/drivers/usb/typec/fusb302/Makefile
deleted file mode 100644 (file)
index 3b51b33..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_TYPEC_FUSB302)    += fusb302.o
diff --git a/drivers/usb/typec/tcpm/Kconfig b/drivers/usb/typec/tcpm/Kconfig
new file mode 100644 (file)
index 0000000..f03ea8a
--- /dev/null
@@ -0,0 +1,52 @@
+config TYPEC_TCPM
+       tristate "USB Type-C Port Controller Manager"
+       depends on USB
+       select USB_ROLE_SWITCH
+       select POWER_SUPPLY
+       help
+         The Type-C Port Controller Manager provides a USB PD and USB Type-C
+         state machine for use with Type-C Port Controllers.
+
+if TYPEC_TCPM
+
+config TYPEC_TCPCI
+       tristate "Type-C Port Controller Interface driver"
+       depends on I2C
+       select REGMAP_I2C
+       help
+         Type-C Port Controller driver for TCPCI-compliant controller.
+
+if TYPEC_TCPCI
+
+config TYPEC_RT1711H
+       tristate "Richtek RT1711H Type-C chip driver"
+       help
+         Richtek RT1711H Type-C chip driver that works with
+         Type-C Port Controller Manager to provide USB PD and USB
+         Type-C functionalities.
+
+endif # TYPEC_TCPCI
+
+config TYPEC_FUSB302
+       tristate "Fairchild FUSB302 Type-C chip driver"
+       depends on I2C
+       help
+         The Fairchild FUSB302 Type-C chip driver that works with
+         Type-C Port Controller Manager to provide USB PD and USB
+         Type-C functionalities.
+
+config TYPEC_WCOVE
+       tristate "Intel WhiskeyCove PMIC USB Type-C PHY driver"
+       depends on ACPI
+       depends on INTEL_SOC_PMIC
+       depends on INTEL_PMC_IPC
+       depends on BXT_WC_PMIC_OPREGION
+       help
+         This driver adds support for USB Type-C on Intel Broxton platforms
+         that have Intel Whiskey Cove PMIC. The driver works with USB Type-C
+         Port Controller Manager to provide USB PD and Type-C functionalities.
+
+         To compile this driver as module, choose M here: the module will be
+         called typec_wcove.ko
+
+endif # TYPEC_TCPM
diff --git a/drivers/usb/typec/tcpm/Makefile b/drivers/usb/typec/tcpm/Makefile
new file mode 100644 (file)
index 0000000..a5ff6c8
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_TYPEC_TCPM)       += tcpm.o
+obj-$(CONFIG_TYPEC_FUSB302)    += fusb302.o
+obj-$(CONFIG_TYPEC_WCOVE)      += typec_wcove.o
+typec_wcove-y                  := wcove.o
+obj-$(CONFIG_TYPEC_TCPCI)      += tcpci.o
+obj-$(CONFIG_TYPEC_RT1711H)    += tcpci_rt1711h.o