From patchwork Tue Nov 5 16:13:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Debski X-Patchwork-Id: 3142521 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E379BEEB2 for ; Tue, 5 Nov 2013 16:17:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A39520145 for ; Tue, 5 Nov 2013 16:16:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3074620127 for ; Tue, 5 Nov 2013 16:16:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754833Ab3KEQQ4 (ORCPT ); Tue, 5 Nov 2013 11:16:56 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:49882 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752812Ab3KEQQz (ORCPT ); Tue, 5 Nov 2013 11:16:55 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MVS006BFT7D8PC0@mailout4.samsung.com>; Wed, 06 Nov 2013 01:16:25 +0900 (KST) Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 13.DE.08134.9D919725; Wed, 06 Nov 2013 01:16:25 +0900 (KST) Received: from amdc1342.digital.local ([106.116.147.39]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MVS0025VT2DD430@mmp1.samsung.com>; Wed, 06 Nov 2013 01:16:25 +0900 (KST) Date: Tue, 05 Nov 2013 17:13:21 +0100 From: Kamil Debski Subject: [PATCH v3 3/3] usb: s3c-hsotg: Use the new Exynos USB phy driver with the generic phy framework In-reply-to: <1383668001-19141-1-git-send-email-k.debski@samsung.com> To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm@vger.kernel.org Cc: kyungmin.park@samsung.com, kishon@ti.com, t.figa@samsung.com, s.nawrocki@samsung.com, m.szyprowski@samsung.com, gautam.vivek@samsung.com, mat.krawczuk@gmail.com, yulgon.kim@samsung.com, p.paneri@samsung.com, av.tikhomirov@samsung.com, jg1.han@samsung.com, galak@codeaurora.org, Kamil Debski Message-id: <1383668001-19141-4-git-send-email-k.debski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-AuditID: cbfee61b-b7fd56d000001fc6-0e-527919d919e5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFLMWRmVeSWpSXmKPExsVy+t9jAd2bkpVBBrNfyFks2X2D1WL+kXOs Fv1vFrJatF05yG5xeeElVosfry+wWVx42sNmcbbpDbvFtJ3/WS0u75rDZjHj/D4mi0XLWpkt 1h65y25xtv82m8X5LZ1MFofftLNarJ/xmsWi4+xBdgchj8t9vUweO2fdZffo27KK0eP4je1M Hp83yQWwRnHZpKTmZJalFunbJXBlrPq3hbXgqmDFj8/r2BsYT/N1MXJySAiYSHT+3skGYYtJ XLi3Hsjm4hASWMQo8ePxPlYIp4NJorP1BWMXIwcHm4CmxKp7HiANIgIzGSU2LzYFqWEWOMok 0fp0CyNIQlggS2JZ42kmEJtFQFVi5YKJYBt4BVwk1p9dyAoyR0JAQWLOJBuQMKeAq8T7eeuZ QWwhoJITS74zT2DkXcDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/dxMjOISfSe9gXNVgcYhR gINRiYf3YmhFkBBrYllxZe4hRgkOZiUR3mP/gUK8KYmVValF+fFFpTmpxYcYpTlYlMR5D7Za BwoJpCeWpGanphakFsFkmTg4pRoYJ4YbsdR4lNzU5qn2ZdXJ3BlV115Y8uBUn4i1V4hpXfGx nWkRV432qTe/OFgy4Vf3+Z6SBWncW08e10qLnvKpatLmL1FX5dq4XN+uzj5lfa5PSciv+q4K 49y/781+bX01YUVry9Navu6vu3xX8214t91piWusSNf66ZEzj7g59J59x/hm0YR7SizFGYmG WsxFxYkAboM/uV0CAAA= References: <1383668001-19141-1-git-send-email-k.debski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the used phy driver to the new Exynos USB phy driver that uses the generic phy framework. Signed-off-by: Kamil Debski Signed-off-by: Kyungmin Park Tested-by: Matt Porter --- drivers/usb/gadget/s3c-hsotg.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index bb31262..dc7f20c 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -162,7 +163,7 @@ struct s3c_hsotg_ep { struct s3c_hsotg { struct device *dev; struct usb_gadget_driver *driver; - struct usb_phy *phy; + struct phy *phy; struct s3c_hsotg_plat *plat; spinlock_t lock; @@ -2905,9 +2906,10 @@ static void s3c_hsotg_phy_enable(struct s3c_hsotg *hsotg) dev_dbg(hsotg->dev, "pdev 0x%p\n", pdev); if (hsotg->phy) - usb_phy_init(hsotg->phy); + phy_power_on(hsotg->phy); else if (hsotg->plat->phy_init) hsotg->plat->phy_init(pdev, hsotg->plat->phy_type); + } /** @@ -2922,7 +2924,7 @@ static void s3c_hsotg_phy_disable(struct s3c_hsotg *hsotg) struct platform_device *pdev = to_platform_device(hsotg->dev); if (hsotg->phy) - usb_phy_shutdown(hsotg->phy); + phy_power_off(hsotg->phy); else if (hsotg->plat->phy_exit) hsotg->plat->phy_exit(pdev, hsotg->plat->phy_type); } @@ -3529,7 +3531,7 @@ static void s3c_hsotg_delete_debug(struct s3c_hsotg *hsotg) static int s3c_hsotg_probe(struct platform_device *pdev) { struct s3c_hsotg_plat *plat = dev_get_platdata(&pdev->dev); - struct usb_phy *phy; + struct phy *phy; struct device *dev = &pdev->dev; struct s3c_hsotg_ep *eps; struct s3c_hsotg *hsotg; @@ -3544,7 +3546,7 @@ static int s3c_hsotg_probe(struct platform_device *pdev) return -ENOMEM; } - phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); + phy = devm_phy_get(&pdev->dev, "device"); if (IS_ERR(phy)) { /* Fallback for pdata */ plat = dev_get_platdata(&pdev->dev);