From patchwork Sat Mar 3 21:43:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10256261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C371B602B5 for ; Sat, 3 Mar 2018 21:49:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5BF9287A1 for ; Sat, 3 Mar 2018 21:49:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8A22287A6; Sat, 3 Mar 2018 21:49:18 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38219287A1 for ; Sat, 3 Mar 2018 21:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xq7qqbGya36abfjwdd/mH7NOqzEkSf8mLCzDWtUr79Q=; b=c9p+eKJALIvMKvB5vt3FyQjaMf KmTm2/xyPbEvX7iQrzUd6ri9e4S9MoTCdo3jkUvC2mV5ICR1BUJJBMcMu9MMMkVvQhzsGIC7CYkvV Jw2v6787v8sqQzrgj0/Yr2jiX9Wnq9mjHN8eYdNdVw9UYLtYXPtB2OwgJpp2wuyqvTkp7wsCPC2GG AysZGv9P9VJ1F2svv1Z4RJNcoU9JMCLOVkbNoE9KoF+U9rQtqhTp/jrFjdU4gHfzIkQiY2hWmtwlj aMFwAQBhFhb/56Qrzfkqvun4xp6BOjhnAzQ+isQAWOzPVFWFAFlDNF2Yik0qUADc36b8tiZgA76xT qlGoTSxw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1esF1f-0004eN-TM; Sat, 03 Mar 2018 21:49:07 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1esEwd-0000EO-1s; Sat, 03 Mar 2018 21:44:18 +0000 Received: by mail-wr0-x241.google.com with SMTP id v111so13487378wrb.3; Sat, 03 Mar 2018 13:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kvwzby3UVUcwvj5FaEyIxid7nLbjZ02BLfnJ+uzZmEw=; b=tsnEepf/WwcB0gQunuFbgIoC+Ll29UI28IfOkqPPLuFSdcfcnIazJwdYyXsE9dcsNS pbnli0kcSi4tOWdo+VvH5VxrUoVx8fXa5aEL7eoGURMQ7+UrZgjDxViPhemBKpqLAdd5 IitoAVog7I9CTOU9qUUr/91IfZGrK1teU+MxrVqzjHOCLwK4isuvki5j0dslYjq92SRa c7VDlCQ4VrsKMuS6UDkAMR4wPQEDSBha5IhQSENp02Vw3BjG4mdnRcxrInATdk4vGe2h ampD1KIVTL0lPndEQ5LYTNLCFACmiWR2UsVOEkpWPHyhgPtZnL/9ve4nrS3AxKeCL45L k6sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kvwzby3UVUcwvj5FaEyIxid7nLbjZ02BLfnJ+uzZmEw=; b=otVTuK4YJnnwMenBzORUslXKjh5Ya9Xl0khOMxcDdo5Ie5n1MgoUUBiPkGpDX4JXnX Zx8+imtvByhBTacJ4C4mechNuNHxPxtnXl1N7ZMzXrxe5WFKki7hMarGic5aAJRZ1nET m8YezJogLNC3Ormc43KriekAEd2eKO5IEjfQqad8YIje33XQUBb1+3XAVa7CXHx2V99k J+fkpteo2GIogIixgMPn+zPmOQLW2qiT7I4GK1w1cVRZu3B6T3eLWJtmx4FKpKdy24t3 JIIP7wdes4mRl9/Uj21UpIya0tpgOeTwBUo70dXEdkKt/8jgzQGiFhLwsVCGBVnrpobH S5OA== X-Gm-Message-State: APf1xPCf18ICaqtxr/ZtugcEh5Lossywp5MHoN5vUMC6l0nn/ZJeG+10 onRD4NtcBxfaKz612RrhmAI= X-Google-Smtp-Source: AG47ELsgj+a0r1dkqVR4gmZS+0F68diUqixDJa7zMRo4QkIdAiK7OKSjE7ivHE8vHuLGAXDjc9/YLw== X-Received: by 10.223.157.131 with SMTP id p3mr8289424wre.278.1520113423011; Sat, 03 Mar 2018 13:43:43 -0800 (PST) Received: from blackbox.darklights.net (p5DD9B279.dip0.t-ipconnect.de. [93.217.178.121]) by smtp.googlemail.com with ESMTPSA id 55sm11073171wrz.6.2018.03.03.13.43.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Mar 2018 13:43:42 -0800 (PST) From: Martin Blumenstingl To: linux-usb@vger.kernel.org, mathias.nyman@intel.com, arnd@arndb.de, gregkh@linuxfoundation.org, felipe.balbi@linux.intel.com Subject: [usb-next PATCH v11 8/8] usb: core: hcd: remove support for initializing a single PHY Date: Sat, 3 Mar 2018 22:43:09 +0100 Message-Id: <20180303214309.25643-9-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180303214309.25643-1-martin.blumenstingl@googlemail.com> References: <20180303214309.25643-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180303_134355_760384_069A6CD0 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Peter.Chen@nxp.com, Martin Blumenstingl , 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 MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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