From patchwork Sun Feb 18 18:45:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10226861 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 3FBD160244 for ; Sun, 18 Feb 2018 18:45:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FE6F28912 for ; Sun, 18 Feb 2018 18:45:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 244F52891C; Sun, 18 Feb 2018 18:45:39 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 7EDEF28912 for ; Sun, 18 Feb 2018 18:45:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751645AbeBRSpf (ORCPT ); Sun, 18 Feb 2018 13:45:35 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:43387 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbeBRSpc (ORCPT ); Sun, 18 Feb 2018 13:45:32 -0500 Received: by mail-wr0-f196.google.com with SMTP id u49so2883011wrc.10; Sun, 18 Feb 2018 10:45:31 -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=6EfUxyTdO09BmiglXW9es5kYS7/HsPbfS1oYY5/lZc8=; b=IvzMzQjZ8ii78PBspTwVJiB1pVQfPuyrgn2dgc8bikbqaYP5rY4SfXSYon/MLlH5k6 9QVewq3/kf+ZPNG4uBO9b60BEFLVGhPWfkZmB29hqusiMfzbXOQnZev8Gi+Dcb+60+xN ZwLS0L3q/7UaLQDzrdbIcGSb/TYf9cblYpt6Sdvy9dRSVoGs2vQsNOBm0r1KOSTXgoh6 QzOkvjoljsoicwdCbWIVIVAqz7TxTBhXMlhwxmIzmQiz1QMg7WqFDzLrBppgo45tnElA lht4eWZ61NBahZDYlh8kXRTMCsweIV5J+pxVQjcd/yI40VSPG3CftAPyF7KzJNgz9rlN 6aWg== 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=6EfUxyTdO09BmiglXW9es5kYS7/HsPbfS1oYY5/lZc8=; b=oeZg1de/UNUGOqqYNzVvzrH9hUGrhMFVgrg8D3S2cmx4M8NsTVH7qOS9jRCO16OWce 7708WbYaRYlMBd6X2fvU6k7rFbpDdTLcij+3HzClnQvM3L7PapuaIGvk/BczojmZnGor k2BCE8rWzxZ1qZdhCUw4lHccv6l6B0QKjqmbYtqPtTY4oJ/Doprep4wGWTZXRfrgLl3w VdU99+YoXP9wxEzgrElqG2OatkX8vGr8n/L3qaXPnFQm4DXG0w12ywuCCUC0sr2Ql76N UwUdkYN8NMILaF0XGJudJrplHaUXK6II353WHebaNjuLMMnjs5ElKdDe+z6YJkwp9ywP 2zrQ== X-Gm-Message-State: APf1xPDro/hYOqdSMB4fCAjA7Bag6+I8Ow37lIAA++V34TkyPNMXGZ5c DV8wOsJCq5DkzjNU0UrFMwFe2MBY X-Google-Smtp-Source: AH8x225TicVZOwlYoUFL4VYEzrGxOxklYXIty91fgSjGkS3TIkVdFk5o7VLYXZzn/nQ0CR5wsaz8XA== X-Received: by 10.223.163.207 with SMTP id m15mr11758267wrb.174.1518979530777; Sun, 18 Feb 2018 10:45:30 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7404304DD6DB7B324975560.dip0.t-ipconnect.de. [2003:dc:d740:4304:dd6d:b7b3:2497:5560]) by smtp.googlemail.com with ESMTPSA id 63sm22860290wms.46.2018.02.18.10.45.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Feb 2018 10:45:30 -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 Cc: linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, jonathanh@nvidia.com, thierry.reding@gmail.com, stern@rowland.harvard.edu, linux@prisktech.co.nz, Peter.Chen@nxp.com, matthias.bgg@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org, narmstrong@baylibre.com, linux-amlogic@lists.infradead.org, yixun.lan@amlogic.com, Martin Blumenstingl 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 Message-Id: <20180218184504.3331-9-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180218184504.3331-1-martin.blumenstingl@googlemail.com> References: <20180218184504.3331-1-martin.blumenstingl@googlemail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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