From: Kamil Debski <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,
Kamil Debski <k.debski@samsung.com>
Subject: [PATCH 5/5] usb: s3c-hsotg: Use the new Exynos USB phy driver with the generic phy framework
Date: Fri, 25 Oct 2013 16:15:29 +0200 [thread overview]
Message-ID: <1382710529-12082-6-git-send-email-k.debski@samsung.com> (raw)
In-Reply-To: <1382710529-12082-1-git-send-email-k.debski@samsung.com>
Change the used phy driver to the new Exynos USB phy driver that uses the
generic phy framework.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/usb/gadget/s3c-hsotg.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 7705c41..2ce84a5 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -29,6 +29,7 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
+#include <linux/phy/phy.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
@@ -131,6 +132,7 @@ struct s3c_hsotg_ep {
/**
* struct s3c_hsotg - driver state.
* @dev: The parent device supplied to the probe function
+
* @driver: USB gadget driver
* @phy: The otg phy transceiver structure for phy control.
* @plat: The platform specific configuration data. This can be removed once
@@ -154,7 +156,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;
@@ -2858,9 +2860,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);
+
}
/**
@@ -2875,7 +2878,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);
}
@@ -3485,7 +3488,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 = pdev->dev.platform_data;
- struct usb_phy *phy;
+ struct phy *phy;
struct device *dev = &pdev->dev;
struct s3c_hsotg_ep *eps;
struct s3c_hsotg *hsotg;
@@ -3500,7 +3503,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 = pdev->dev.platform_data;
--
1.7.9.5
next prev parent reply other threads:[~2013-10-25 14:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 14:15 [PATCH 0/5] phy: Add new Exynos USB PHY driver Kamil Debski
2013-10-25 14:15 ` [PATCH v2 1/5] " Kamil Debski
2013-10-25 15:39 ` Kishon Vijay Abraham I
2013-10-28 13:52 ` Kamil Debski
2013-10-28 20:00 ` Tomasz Figa
2013-10-29 10:16 ` Kamil Debski
2013-10-29 9:52 ` Kishon Vijay Abraham I
2013-10-25 21:36 ` Kumar Gala
2013-10-28 13:52 ` Kamil Debski
2013-10-25 14:15 ` [RFC PATCH 2/5] phy: Add WIP Exynos 5250 support to the " Kamil Debski
2013-10-25 15:43 ` Kishon Vijay Abraham I
2013-10-28 13:52 ` Kamil Debski
2013-10-28 14:41 ` Vivek Gautam
2013-10-29 9:55 ` Kishon Vijay Abraham I
2013-10-29 10:14 ` Kamil Debski
2013-10-29 10:51 ` Kishon Vijay Abraham I
2013-10-25 14:15 ` [PATCH 3/5] phy: Add support for S5PV210 " Kamil Debski
2013-10-25 15:50 ` Kishon Vijay Abraham I
2013-10-26 1:40 ` Jingoo Han
2013-10-25 14:15 ` [PATCH 4/5] usb: ehci-s5p: Change to use phy provided by the generic phy framework Kamil Debski
2013-10-25 15:52 ` Kishon Vijay Abraham I
2013-10-26 1:27 ` Jingoo Han
2013-10-28 13:52 ` Kamil Debski
2013-10-26 9:41 ` Vivek Gautam
2013-10-28 13:53 ` Kamil Debski
2013-10-28 14:36 ` Vivek Gautam
2013-10-25 14:15 ` Kamil Debski [this message]
2013-10-25 15:53 ` [PATCH 5/5] usb: s3c-hsotg: Use the new Exynos USB phy driver with " Kishon Vijay Abraham I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382710529-12082-6-git-send-email-k.debski@samsung.com \
--to=k.debski@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=gautam.vivek@samsung.com \
--cc=kishon@ti.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mat.krawczuk@gmail.com \
--cc=s.nawrocki@samsung.com \
--cc=t.figa@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).