From patchwork Fri Sep 7 12:56:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10592141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C58114BD for ; Fri, 7 Sep 2018 12:56:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B81B2B316 for ; Fri, 7 Sep 2018 12:56:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DA4B2B318; Fri, 7 Sep 2018 12:56:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,URIBL_SBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E0EF2B316 for ; Fri, 7 Sep 2018 12:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729450AbeIGRhW (ORCPT ); Fri, 7 Sep 2018 13:37:22 -0400 Received: from mga17.intel.com ([192.55.52.151]:26781 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729427AbeIGRhW (ORCPT ); Fri, 7 Sep 2018 13:37:22 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Sep 2018 05:56:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,342,1531810800"; d="scan'208";a="88023429" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Sep 2018 05:56:25 -0700 From: Heikki Krogerus To: Greg Kroah-Hartman , Guenter Roeck Cc: Hans de Goede , linux-usb@vger.kernel.org Subject: [PATCH] usb: typec: Group all TCPCI/TCPM code together Date: Fri, 7 Sep 2018 15:56:25 +0300 Message-Id: <20180907125625.79984-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.18.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Moving all the drivers that depend on the Port Controller Manager under a new a new directory drivers/usb/typec/tcpci/ and making Guenter Roeck as the designated reviewer of that code. Signed-off-by: Heikki Krogerus --- Hi guys, This should be fairly trivial change. There is no functional effect. Even menuconfig looks the same. The only interesting thing is that I'm proposing that Guenter is marked as the reviewer/maintainer of all TCPCI/TCPM drivers. So Guenter, I guess the only question is that are you okay with this? thanks, --- MAINTAINERS | 6 +++ drivers/usb/typec/Kconfig | 45 +--------------- drivers/usb/typec/Makefile | 6 +-- drivers/usb/typec/fusb302/Kconfig | 7 --- drivers/usb/typec/fusb302/Makefile | 2 - drivers/usb/typec/tcpci/Kconfig | 52 +++++++++++++++++++ drivers/usb/typec/tcpci/Makefile | 7 +++ .../usb/typec/{fusb302 => tcpci}/fusb302.c | 0 .../typec/{fusb302 => tcpci}/fusb302_reg.h | 0 drivers/usb/typec/{ => tcpci}/tcpci.c | 0 drivers/usb/typec/{ => tcpci}/tcpci.h | 0 drivers/usb/typec/{ => tcpci}/tcpci_rt1711h.c | 0 drivers/usb/typec/{ => tcpci}/tcpm.c | 0 .../typec/{typec_wcove.c => tcpci/wcove.c} | 0 14 files changed, 67 insertions(+), 58 deletions(-) delete mode 100644 drivers/usb/typec/fusb302/Kconfig delete mode 100644 drivers/usb/typec/fusb302/Makefile create mode 100644 drivers/usb/typec/tcpci/Kconfig create mode 100644 drivers/usb/typec/tcpci/Makefile rename drivers/usb/typec/{fusb302 => tcpci}/fusb302.c (100%) rename drivers/usb/typec/{fusb302 => tcpci}/fusb302_reg.h (100%) rename drivers/usb/typec/{ => tcpci}/tcpci.c (100%) rename drivers/usb/typec/{ => tcpci}/tcpci.h (100%) rename drivers/usb/typec/{ => tcpci}/tcpci_rt1711h.c (100%) rename drivers/usb/typec/{ => tcpci}/tcpm.c (100%) rename drivers/usb/typec/{typec_wcove.c => tcpci/wcove.c} (100%) diff --git a/MAINTAINERS b/MAINTAINERS index d5382b224f80..22702a40fa23 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15301,6 +15301,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 INTERFACE DRIVERS +M: Guenter Roeck +L: linux-usb@vger.kernel.org +S: Maintained +F: drivers/usb/typec/tcpci/ + USB UHCI DRIVER M: Alan Stern L: linux-usb@vger.kernel.org diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig index 00878c386dd0..64e8aeabb368 100644 --- a/drivers/usb/typec/Kconfig +++ b/drivers/usb/typec/Kconfig @@ -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/tcpci/Kconfig" source "drivers/usb/typec/ucsi/Kconfig" diff --git a/drivers/usb/typec/Makefile b/drivers/usb/typec/Makefile index 45b0aef428a8..7fa8dd301d72 100644 --- a/drivers/usb/typec/Makefile +++ b/drivers/usb/typec/Makefile @@ -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) += tcpci/ 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 index fce099ff39fe..000000000000 --- a/drivers/usb/typec/fusb302/Kconfig +++ /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 index 3b51b33631a0..000000000000 --- a/drivers/usb/typec/fusb302/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_TYPEC_FUSB302) += fusb302.o diff --git a/drivers/usb/typec/tcpci/Kconfig b/drivers/usb/typec/tcpci/Kconfig new file mode 100644 index 000000000000..4f3e10380787 --- /dev/null +++ b/drivers/usb/typec/tcpci/Kconfig @@ -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 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 diff --git a/drivers/usb/typec/tcpci/Makefile b/drivers/usb/typec/tcpci/Makefile new file mode 100644 index 000000000000..a5ff6c8eb892 --- /dev/null +++ b/drivers/usb/typec/tcpci/Makefile @@ -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 diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/tcpci/fusb302.c similarity index 100% rename from drivers/usb/typec/fusb302/fusb302.c rename to drivers/usb/typec/tcpci/fusb302.c diff --git a/drivers/usb/typec/fusb302/fusb302_reg.h b/drivers/usb/typec/tcpci/fusb302_reg.h similarity index 100% rename from drivers/usb/typec/fusb302/fusb302_reg.h rename to drivers/usb/typec/tcpci/fusb302_reg.h diff --git a/drivers/usb/typec/tcpci.c b/drivers/usb/typec/tcpci/tcpci.c similarity index 100% rename from drivers/usb/typec/tcpci.c rename to drivers/usb/typec/tcpci/tcpci.c diff --git a/drivers/usb/typec/tcpci.h b/drivers/usb/typec/tcpci/tcpci.h similarity index 100% rename from drivers/usb/typec/tcpci.h rename to drivers/usb/typec/tcpci/tcpci.h diff --git a/drivers/usb/typec/tcpci_rt1711h.c b/drivers/usb/typec/tcpci/tcpci_rt1711h.c similarity index 100% rename from drivers/usb/typec/tcpci_rt1711h.c rename to drivers/usb/typec/tcpci/tcpci_rt1711h.c diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpci/tcpm.c similarity index 100% rename from drivers/usb/typec/tcpm.c rename to drivers/usb/typec/tcpci/tcpm.c diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/tcpci/wcove.c similarity index 100% rename from drivers/usb/typec/typec_wcove.c rename to drivers/usb/typec/tcpci/wcove.c