From patchwork Wed Jan 16 15:01:02 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: 212551 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 209772C029F for ; Thu, 17 Jan 2013 02:04:10 +1100 (EST) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mailhost.ti.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D4FDD2C0096; Thu, 17 Jan 2013 02:02:07 +1100 (EST) Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0GF1Vmo027708; Wed, 16 Jan 2013 09:01:32 -0600 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0GF1Nvd027486; Wed, 16 Jan 2013 20:31:31 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Wed, 16 Jan 2013 20:31:24 +0530 Received: from a0393678lt.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0GF19sI010224; Wed, 16 Jan 2013 20:31:23 +0530 From: Kishon Vijay Abraham I To: , , , , , , , , Subject: [RFC PATCH 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot Date: Wed, 16 Jan 2013 20:31:02 +0530 Message-ID: <1358348462-27693-7-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358348462-27693-1-git-send-email-kishon@ti.com> References: <1358348462-27693-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Cc: linux@arm.linux.org.uk, b-cousson@ti.com, tony@atomide.com, gregkh@linuxfoundation.org, rob.herring@calxeda.com, kishon@ti.com, cbou@mail.ru, alexander.shishkin@linux.intel.com, horms@verge.net.au, stern@rowland.harvard.edu, haojian.zhuang@gmail.com, rob@landley.net, eric.y.miao@gmail.com, dwmw2@infradead.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The OMAP glue has been modified to get PHY by phandle for dt boot. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/musb/omap2430.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 3628a50..08709cf 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -346,7 +346,12 @@ 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, 0); + if (dev->parent->of_node) + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent, + "usb_phy", 0); + else + musb->xceiv = devm_usb_get_phy(dev, 0); + if (IS_ERR_OR_NULL(musb->xceiv)) { pr_err("HS USB OTG: no transceiver configured\n"); return -ENODEV;