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: 871808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="sz0JtHvr"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zfhHB074rz9t2l for ; Mon, 12 Feb 2018 08:08:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753673AbeBKVIe (ORCPT ); Sun, 11 Feb 2018 16:08:34 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:41683 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932178AbeBKVIZ (ORCPT ); Sun, 11 Feb 2018 16:08:25 -0500 Received: by mail-wr0-f196.google.com with SMTP id q11so1510904wre.8; Sun, 11 Feb 2018 13:08:23 -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=HWk8yKsEVZpbKOu/CPoVd1p0ZtwFWVPsZbt8KUuL+UIir3wUwdVmvDMsXVEN+fDL/j AS2TIosAUtYT8kApqvoIc/4A4V2ffn9e6jliW1XSh5cmVMS45IXGN1o7WcwomZbfTDNe 48muN2lj5sgFa2tPQP8IdWqyk/+r664BcHUqmaXYYVQwgjr6Z65/LK4qAUVbRR8DUmrT Fx8/Ux9+h26Z7jJfyyg6DslqvpQOkjHxsYkAq9qDy8h9wqXBP6AyzWlrI+dIcgFbnyHw XNDVOnAsWC1v2aM9yA6zBnxNVtELphbkKlC1fROKt52zDAhheyK6HsHIU/Ya1dC9o5VQ FUKw== X-Gm-Message-State: APf1xPCSzcnjn2tkDUeZQGJkAgn5K9CZC5TdaD1KEL7Ggo4iilALlVlc DM37Jr9q3tocoM3aV8wWphwlGUT4 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 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 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> Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org 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