From patchwork Tue Mar 12 10:44:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 2255051 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D2872E00E6 for ; Tue, 12 Mar 2013 10:48:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755390Ab3CLKpT (ORCPT ); Tue, 12 Mar 2013 06:45:19 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:51549 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755278Ab3CLKpP (ORCPT ); Tue, 12 Mar 2013 06:45:15 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2CAj92E026261; Tue, 12 Mar 2013 05:45:09 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2CAj88E018580; Tue, 12 Mar 2013 05:45:08 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Tue, 12 Mar 2013 05:45:08 -0500 Received: from localhost.localdomain (h115-205.vpn.ti.com [172.24.115.205]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2CAir0Y008758; Tue, 12 Mar 2013 05:45:06 -0500 From: Roger Quadros To: CC: , , , , , , , , Subject: [PATCH 05/12] USB: ehci-omap: Remove PHY regulator handling code Date: Tue, 12 Mar 2013 12:44:43 +0200 Message-ID: <1363085090-24676-6-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1363085090-24676-1-git-send-email-rogerq@ti.com> References: <1363085090-24676-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org PHY regulator handling must be done in the PHY driver Signed-off-by: Roger Quadros Acked-by: Felipe Balbi Acked-by: Alan Stern --- drivers/usb/host/ehci-omap.c | 34 ---------------------------------- 1 files changed, 0 insertions(+), 34 deletions(-) diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 0bbfdc1..57fe985 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -112,19 +111,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 */ @@ -152,7 +138,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) int ret = -ENODEV; int irq; int i; - char supply[7]; struct omap_hcd *omap; if (usb_disabled()) @@ -213,23 +198,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) usb_phy_set_suspend(omap->phy[i], 0); } - /* get ehci regulator and enable */ - for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { - if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) { - pdata->regulator[i] = NULL; - 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]); - } - } - pm_runtime_enable(dev); pm_runtime_get_sync(dev); @@ -255,7 +223,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); err_phy: @@ -286,7 +253,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev) int i; usb_remove_hcd(hcd); - disable_put_regulator(dev->platform_data); for (i = 0; i < omap->nports; i++) { if (omap->phy[i])