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: 10226913 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 A4A3660244 for ; Sun, 18 Feb 2018 18:52:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91DF1288B5 for ; Sun, 18 Feb 2018 18:52:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84C002891B; Sun, 18 Feb 2018 18:52:08 +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 1383A288B5 for ; Sun, 18 Feb 2018 18:52:08 +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=uLWi+caddDpr/IMuiH4Wbr5Bj2DhCjkBxu+bZ9jBtH0=; b=uj6MhXZ1OEYGdwE0TMdZZ3BX62 y2HapFuQOANAFfhPWQfvmunTSnQ6Rz5WH8K8vHx1/Io0infLQVnPymO80KTMapqzhdF8KTAjEarNt m/iBK9aDLkSiLj6gmWpPD5hC9CcQTdvpAyhtNwtaLblIJIgNKfiCCcOuEVka+oa8JWqRiHZvvE7P5 GMEfWk0CsufxvDWjEI/jY9kjbGKaWG4ocoFO9b6gmZz9jZ2die4luUkk2l2vgC/bBKcKeevGiPnRE wQ+EvTOAmUt2B5caUgDmx8bpV6sAFp7rLMy7ksUyiBZkVJvh6YdBQN8TjNn25X6eeke0ERHPGwGjX RpGbm37A==; 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 1enU46-0002Oe-20; Sun, 18 Feb 2018 18:51:58 +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 1enTy3-0006Rl-J4; Sun, 18 Feb 2018 18:45:53 +0000 Received: by mail-wr0-x241.google.com with SMTP id w77so7534890wrc.6; Sun, 18 Feb 2018 10:45:32 -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=rainl8sN2mdULO7RNs6O2ruVpe2OqPPmhJ7sJpWvliOagc81IuHycjJsnNQdlvhocg FyiS6kE2Wt6a4JIwGKI6Cq7xVo0qBiN6dfIB4lcPSlyq8yALkY1szX2WFgio4LBlpu/i IC/bthWL9F9M43ZjwgR0/tQRZLnM7e99roR0rC3bcsiIgYyk64xP+Ks3cIS/p4FQMAh3 t3bygREiwRckSvtSf5FpXywJiFCz6taFU9AY6dtPvChEhOyP6rSYwv+Tkx1iIahE20C6 +rue01/xLks4iP74mTzlMv5i8fK0lMV9x63XbMhMRvR6amHTzl6Rt30nYrD4IqTRnGMO PttQ== X-Gm-Message-State: APf1xPBnjfh0/qw1K4pOqEDiBEp844y59ILLvV7Jw9TMKqXDmnSoKLSx YYyycdAgrxOszv+zBxccFRo= 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180218_104544_189816_461C90D1 X-CRM114-Status: UNSURE ( 9.81 ) 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