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: 1989291 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0D67C3FDD1 for ; Wed, 16 Jan 2013 15:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756663Ab3APPEQ (ORCPT ); Wed, 16 Jan 2013 10:04:16 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:46118 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756149Ab3APPCe (ORCPT ); Wed, 16 Jan 2013 10:02:34 -0500 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: , , , , , , , , CC: , , , , , , , , , , , , , , , , 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 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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;