From patchwork Tue Jan 22 09:58:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 2017411 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 4FFD9DF2EB for ; Tue, 22 Jan 2013 10:01:45 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Txad6-0004LG-LN; Tue, 22 Jan 2013 09:58:56 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Txaco-0004Gv-OK for linux-arm-kernel@lists.infradead.org; Tue, 22 Jan 2013 09:58:41 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0M9wU86001258; Tue, 22 Jan 2013 03:58:31 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0M9wQ3n007349; Tue, 22 Jan 2013 15:28:30 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Tue, 22 Jan 2013 15:28:26 +0530 Received: from a0393678lt.india.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0M9wIaI024314; Tue, 22 Jan 2013 15:28:26 +0530 From: Kishon Vijay Abraham I To: , , , , , , , , , , Subject: [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs Date: Tue, 22 Jan 2013 15:28:12 +0530 Message-ID: <1358848694-20145-5-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358848694-20145-1-git-send-email-kishon@ti.com> References: <1358848694-20145-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130122_045838_864024_1B5AB308 X-CRM114-Status: GOOD ( 11.16 ) X-Spam-Score: -4.6 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.94.94.40 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -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: kishon@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 New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are used in MUSB (OMAP), in order to make use of the binding information provided in the board file (of OMAP platforms). All the platforms should be modified similar to this to add and get the PHY. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/musb/omap2430.c | 2 +- drivers/usb/otg/twl4030-usb.c | 3 ++- drivers/usb/phy/omap-usb2.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index bf6cfe0..1a8cf6d 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb) * up through ULPI. TWL4030-family PMICs include one, * which needs a driver, drivers aren't always needed. */ - musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); + musb->xceiv = devm_usb_get_phy_dev(dev, 0); if (IS_ERR_OR_NULL(musb->xceiv)) { pr_err("HS USB OTG: no transceiver configured\n"); return -ENODEV; diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 0a70193..a994715 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev) twl->phy.dev = twl->dev; twl->phy.label = "twl4030"; twl->phy.otg = otg; + twl->phy.type = USB_PHY_TYPE_USB2; twl->phy.set_suspend = twl4030_set_suspend; otg->phy = &twl->phy; @@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev) dev_err(&pdev->dev, "ldo init failed\n"); return err; } - usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2); + usb_add_phy_dev(&twl->phy); platform_set_drvdata(pdev, twl); if (device_create_file(&pdev->dev, &dev_attr_vbus)) diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c index 4b59b39..b5c759c 100644 --- a/drivers/usb/phy/omap-usb2.c +++ b/drivers/usb/phy/omap-usb2.c @@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev) phy->phy.label = "omap-usb2"; phy->phy.set_suspend = omap_usb2_suspend; phy->phy.otg = otg; + phy->phy.type = USB_PHY_TYPE_USB2; res = platform_get_resource(pdev, IORESOURCE_MEM, 1); @@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev) } clk_prepare(phy->wkupclk); - usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2); + usb_add_phy_dev(&phy->phy); platform_set_drvdata(pdev, phy);