From patchwork Sun Feb 11 21:06:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10211591 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 B561560329 for ; Sun, 11 Feb 2018 21:22:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A32EF2899D for ; Sun, 11 Feb 2018 21:22:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9667F28A9A; Sun, 11 Feb 2018 21:22:07 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D4A252899D for ; Sun, 11 Feb 2018 21:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=MIQLITmXaqbfrQTNxYDbrHAew+0vvq+jY9IN+fT/y0g=; b=L0pophy8S7uv9j2aCxzZIEKy22 8i0Me0toFFvM2JtJ2SvV00S3mFpiwNZF8Z6mWdBLfYraj3SDinKMhUac5yAFdwEjbmV4xdcTMLoNR O6JxqsbMbOGyl3U2ue+DjcrHrLUWdOgoL4gqU/7IVww+2xv0liRIP7Ed01BJGs2cVV9XFYdOOrw6R iFQC6wpwU4rJrVXZcwpgIbrZEFIE4UbZO2LIMfRisPRxzoQr8Ze7zif3CvOeX9qhrIUgKhVdQZcf0 ycTZ85RzH4T73vwPPNZeFOB8G3tmRvjXV8SKFCsXBXSG3curG73NYuz+9ayjOluBiBPtoJxvkf27K NFmjO7kw==; Received: from [198.137.202.133] (helo=bombadil.infradead.org) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ekz4P-0004J3-In for patchwork-linux-mediatek@patchwork.kernel.org; Sun, 11 Feb 2018 21:21:58 +0000 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=MIQLITmXaqbfrQTNxYDbrHAew+0vvq+jY9IN+fT/y0g=; b=YfeDHg9o3WArEZhRIdej+UID4Y 8785OAaZlWixwvMMPPDMP2z7HmH5MERFHs6vVFLBUq4i3/Wwc7EUfciBIiX6bo0kHXV7ytFPtpEBj uXzL/ZT8TkcozrSNwMA6IgEDRevM9li2hqn1mtO+xhGcJnt97Yus6Cm+D1CbGWAa9p5il2vtcq+bn NxV5nIL7ouBwVKPMKSLZsF4Jva0ZichL4PMKXxkrIiWDPj5p64BMWDSy8/DPiKDtXBjB0zwdCAFzC VKpZ6rXXW7mkk2RE+hG5bKROMSPsfLrhS9zwD4PIYNc4ISvcuHXShCxwV2HNvbacrMYXQ7Y/rukf/ 23bHeZZQ==; 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 1ekytR-0003yJ-6C; Sun, 11 Feb 2018 21:10:37 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ekyrS-0007yp-An; Sun, 11 Feb 2018 21:08:35 +0000 Received: by mail-wr0-x242.google.com with SMTP id k32so6795432wrk.4; Sun, 11 Feb 2018 13:08:24 -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=3THcGmz37tcqQeGQSgU+4hNv1AwHrd5jVPIcWXzkwgQ=; b=sz0JtHvry9AxQKIVJ0kLyHzG2A6trLUYi1ikYq24pQh+Ianmq6Uu4LcBTFqunLYe6H yj3TCXOHwr2bV64qeYGo74Zqkf3Xm7lZKD5qTnpRKI+sKKQ6cYA3l0VLbFdD/ZW0uQhk bkWSLo/7MEMTK+Ffg4pIGnfw5/Ywc5LAoQf2jwD7jzS96HHgAXbQaFxhaKWg21ISG2kM m9gD0w7D4Wi341CqwBOjD/9+f6f+CmzoygLHvna59e2jIA4AQ6K1F5Z//ZGnXpsIp2my aTD6jKZYP//TzGfsSuDI2m5P0Y1Vh9oGpWBJp0zvzAiTZSEClVDjxj9JAG1tTyefhTTe B9Mg== 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=3THcGmz37tcqQeGQSgU+4hNv1AwHrd5jVPIcWXzkwgQ=; b=ZlPVy47AT/VhmDcTSTiLyMOXiGMNXaJqiYWCoLxfO91PnBuRqT5R4wY0vHcP/RUUIW /zeTPFh6x70KWGVhbYP6ZpAXwM7r1ZxJqMD3jxWHSYgiF6NphrPk+kivshSjrb3lV0gC eZONeJvRRoNMA8q52dHs8Ne8lRZ4YLPgpAHvdPoMLJ+lyEeW/1O/x9pXxnQX4IuplTgH JszcOQ1P9gaTCbxfG+IHSh0M2gdWc4GPXFCB2NIdedtDC5EEVgX5O1KiRFStgfxYskLr ecZl5HKQ96MfOJbMAIzH8TQTCQQGK85ytb6yMt/oNKAi5KD3yDgNAvtSG4Ebily9S/ff mp7w== X-Gm-Message-State: APf1xPDWFlLoXZGnwGma73w00GjrpLmbPb27zCw47ruDOFIs7O2HwZDK 2FMtl8JWrS1TWdbw0PeF33Q= X-Google-Smtp-Source: AH8x224sdg3Ev7OND0y5rgTA2+Igy4r2yeZg/tYC/X7E9vFaYTKO6uzhQQZSl81vq3Y1T3zcCbOyKg== X-Received: by 10.223.158.207 with SMTP id b15mr1153509wrf.192.1518383302930; Sun, 11 Feb 2018 13:08:22 -0800 (PST) Received: from blackbox.darklights.net (p5B056154.dip0.t-ipconnect.de. [91.5.97.84]) by smtp.googlemail.com with ESMTPSA id k13sm6301773wrd.61.2018.02.11.13.08.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2018 13:08:22 -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 v9 8/8] usb: core: hcd: remove support for initializing a single PHY Date: Sun, 11 Feb 2018 22:06:51 +0100 Message-Id: <20180211210651.2046-9-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180211210651.2046-1-martin.blumenstingl@googlemail.com> References: <20180211210651.2046-1-martin.blumenstingl@googlemail.com> X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=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 b85e3d4fb0c5..68694afd4a46 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -109,7 +109,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