From patchwork Thu Jan 10 16:51:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 1961331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 217F2DF264 for ; Thu, 10 Jan 2013 16:59:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TtLPB-0006pT-Bb; Thu, 10 Jan 2013 16:55:04 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TtLMI-0005ZG-2G for linux-arm-kernel@lists.infradead.org; Thu, 10 Jan 2013 16:52:04 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0AGpxsT028068; Thu, 10 Jan 2013 10:51:59 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0AGpxk6029980; Thu, 10 Jan 2013 10:51:59 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Thu, 10 Jan 2013 10:51:59 -0600 Received: from rockdesk.itg.ti.com (h113-58.vpn.ti.com [172.24.113.58]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0AGpYI8023935; Thu, 10 Jan 2013 10:51:57 -0600 From: Roger Quadros To: Subject: [PATCH 10/14] usb: ehci-omap: Remove PHY regulator handling code Date: Thu, 10 Jan 2013 18:51:30 +0200 Message-ID: <1357836694-30788-11-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1357836694-30788-1-git-send-email-rogerq@ti.com> References: <1357836694-30788-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130110_115202_700057_E7926E00 X-CRM114-Status: GOOD ( 11.39 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.153 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: sameo@linux.intel.com, tony@atomide.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kishon@ti.com, linux-arm-kernel@lists.infradead.org, rogerq@ti.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org PHY regulator handling must be done in the PHY driver Signed-off-by: Roger Quadros --- drivers/usb/host/ehci-omap.c | 31 +------------------------------ 1 files changed, 1 insertions(+), 30 deletions(-) diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 46b28d6..02475c7 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -105,19 +104,6 @@ static int omap_ehci_init(struct usb_hcd *hcd) return rc; } -static void disable_put_regulator( - struct usbhs_omap_platform_data *pdata) -{ - int i; - - for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { - if (pdata->regulator[i]) { - regulator_disable(pdata->regulator[i]); - regulator_put(pdata->regulator[i]); - } - } -} - /* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ @@ -140,7 +126,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) int ret = -ENODEV; int irq; int i; - char supply[7]; if (usb_disabled()) return -ENODEV; @@ -203,24 +188,12 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) platform_set_drvdata(pdev, omap_hcd); - /* get ehci regulator and enable */ for (i = 0 ; i < omap_hcd->nports ; i++) { struct platform_device *phy_pdev; struct usbhs_phy_config *phy_config; - if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) { - pdata->regulator[i] = NULL; + if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) continue; - } - snprintf(supply, sizeof(supply), "hsusb%d", i); - pdata->regulator[i] = regulator_get(dev, supply); - if (IS_ERR(pdata->regulator[i])) { - pdata->regulator[i] = NULL; - dev_dbg(dev, - "failed to get ehci port%d regulator\n", i); - } else { - regulator_enable(pdata->regulator[i]); - } /* instantiate PHY */ if (!pdata->phy_config[i]) { @@ -275,7 +248,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) return 0; err_pm_runtime: - disable_put_regulator(pdata); pm_runtime_put_sync(dev); usb_put_hcd(hcd); for (i = 0 ; i < omap_hcd->nports ; i++) { @@ -307,7 +279,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev) int i; usb_remove_hcd(hcd); - disable_put_regulator(dev->platform_data); iounmap(hcd->regs); usb_put_hcd(hcd);