From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: linux-usb@vger.kernel.org, mathias.nyman@intel.com,
arnd@arndb.de, gregkh@linuxfoundation.org,
felipe.balbi@linux.intel.com
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
Peter.Chen@nxp.com,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
narmstrong@baylibre.com, yixun.lan@amlogic.com,
robh+dt@kernel.org, jonathanh@nvidia.com, linux@prisktech.co.nz,
matthias.bgg@gmail.com, thierry.reding@gmail.com,
linux-mediatek@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-tegra@vger.kernel.org,
stern@rowland.harvard.edu, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH usb-next v10 8/8] usb: core: hcd: remove support for initializing a single PHY
Date: Sun, 18 Feb 2018 19:45:04 +0100 [thread overview]
Message-ID: <20180218184504.3331-9-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20180218184504.3331-1-martin.blumenstingl@googlemail.com>
With the new PHY wrapper in place we can now handle multiple PHYs.
Remove the code which handles only one generic PHY as this is now
covered (with support for multiple PHYs as well as suspend/resume
support) by the new PHY wrapper.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
drivers/usb/core/hcd.c | 37 -------------------------------------
include/linux/usb/hcd.h | 1 -
2 files changed, 38 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 32797c25ac3b..5a92d8f7c484 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2757,30 +2757,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
}
}
- if (IS_ENABLED(CONFIG_GENERIC_PHY) && !hcd->skip_phy_initialization) {
- struct phy *phy = phy_get(hcd->self.sysdev, "usb");
-
- if (IS_ERR(phy)) {
- retval = PTR_ERR(phy);
- if (retval == -EPROBE_DEFER)
- goto err_phy;
- } else {
- retval = phy_init(phy);
- if (retval) {
- phy_put(phy);
- goto err_phy;
- }
- retval = phy_power_on(phy);
- if (retval) {
- phy_exit(phy);
- phy_put(phy);
- goto err_phy;
- }
- hcd->phy = phy;
- hcd->remove_phy = 1;
- }
- }
-
if (!hcd->skip_phy_initialization) {
hcd->phy_roothub = usb_phy_roothub_init(hcd->self.sysdev);
if (IS_ERR(hcd->phy_roothub)) {
@@ -2961,13 +2937,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
err_usb_phy_roothub_power_on:
usb_phy_roothub_exit(hcd->phy_roothub);
err_phy_roothub_init:
- if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) {
- phy_power_off(hcd->phy);
- phy_exit(hcd->phy);
- phy_put(hcd->phy);
- hcd->phy = NULL;
- }
-err_phy:
if (hcd->remove_phy && hcd->usb_phy) {
usb_phy_shutdown(hcd->usb_phy);
usb_put_phy(hcd->usb_phy);
@@ -3048,12 +3017,6 @@ void usb_remove_hcd(struct usb_hcd *hcd)
usb_phy_roothub_power_off(hcd->phy_roothub);
usb_phy_roothub_exit(hcd->phy_roothub);
- if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) {
- phy_power_off(hcd->phy);
- phy_exit(hcd->phy);
- phy_put(hcd->phy);
- hcd->phy = NULL;
- }
if (hcd->remove_phy && hcd->usb_phy) {
usb_phy_shutdown(hcd->usb_phy);
usb_put_phy(hcd->usb_phy);
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index a042675e03ba..aef50cb2ed1b 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -103,7 +103,6 @@ struct usb_hcd {
* other external phys should be software-transparent
*/
struct usb_phy *usb_phy;
- struct phy *phy;
struct usb_phy_roothub *phy_roothub;
/* Flags that need to be manipulated atomically because they can
--
2.16.1
prev parent reply other threads:[~2018-02-18 18:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-18 18:44 [PATCH usb-next v10 0/8] initialize (multiple) PHYs for a HCD Martin Blumenstingl
[not found] ` <20180218184504.3331-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2018-02-18 18:44 ` [PATCH usb-next v10 1/8] dt-bindings: usb: add the documentation for USB HCDs Martin Blumenstingl
2018-02-18 18:44 ` [PATCH usb-next v10 2/8] usb: add a flag to skip PHY initialization to struct usb_hcd Martin Blumenstingl
2018-02-26 3:26 ` Peter Chen
2018-02-18 18:44 ` [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD Martin Blumenstingl
2018-03-16 14:32 ` Roger Quadros
[not found] ` <7f511a6f-f3a2-2002-f601-5ce1742f4539-l0cyMroinI0@public.gmane.org>
2018-03-18 22:29 ` Martin Blumenstingl
[not found] ` <CAFBinCAOG9Yj5PQo4wsxH2Ev6WOwFge+jBMprRiOgxKuA_z8wA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-19 6:02 ` Chunfeng Yun
2018-03-19 8:49 ` Roger Quadros
[not found] ` <e723fe80-1ff3-6f47-fbbd-699dfcd0be4f-l0cyMroinI0@public.gmane.org>
2018-03-19 16:12 ` Martin Blumenstingl
2018-03-20 11:27 ` Kishon Vijay Abraham I
[not found] ` <e5dcaf32-7001-d647-1a36-359a9728fa9a-l0cyMroinI0@public.gmane.org>
2018-03-20 21:57 ` Martin Blumenstingl
2018-03-20 23:47 ` Chunfeng Yun
[not found] ` <CAFBinCBB2eqHC-k9wN67ZehKb9eun=mPaLuqhrbR-J1C0Ldqtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-20 7:54 ` Chunfeng Yun
2018-03-20 10:55 ` Roger Quadros
[not found] ` <8812bba8-bd2e-85dd-9506-a2e856db4f14-l0cyMroinI0@public.gmane.org>
2018-03-20 11:02 ` Roger Quadros
2018-03-20 12:04 ` Chunfeng Yun
2018-03-20 22:01 ` Martin Blumenstingl
[not found] ` <CAFBinCC7X08oVt223FeZHSqmbCry9aKA8JXz+WmLuDRwwtr+gQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-21 11:30 ` Roger Quadros
[not found] ` <613ebb74-6167-56bc-6fa0-2b3c9876ccaa-l0cyMroinI0@public.gmane.org>
2018-03-22 8:10 ` Chunfeng Yun
2018-03-22 12:41 ` Roger Quadros
[not found] ` <e9ef724f-0a62-cd35-9e0a-82643bde4a16-l0cyMroinI0@public.gmane.org>
2018-03-23 3:19 ` Chunfeng Yun
2018-03-24 11:23 ` Martin Blumenstingl
2018-03-19 5:43 ` Chunfeng Yun
2018-02-18 18:45 ` [PATCH usb-next v10 4/8] usb: core: hcd: integrate the PHY wrapper into the HCD core Martin Blumenstingl
2018-02-18 18:45 ` [PATCH usb-next v10 5/8] usb: host: xhci-mtk: remove custom USB PHY handling Martin Blumenstingl
2018-02-18 18:45 ` [PATCH usb-next v10 6/8] usb: host: ehci-platform: " Martin Blumenstingl
2018-02-18 18:45 ` [PATCH usb-next v10 7/8] usb: host: ohci-platform: " Martin Blumenstingl
2018-02-18 18:45 ` Martin Blumenstingl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180218184504.3331-9-martin.blumenstingl@googlemail.com \
--to=martin.blumenstingl@googlemail.com \
--cc=Peter.Chen@nxp.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@prisktech.co.nz \
--cc=mark.rutland@arm.com \
--cc=mathias.nyman@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=narmstrong@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=thierry.reding@gmail.com \
--cc=yixun.lan@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox