From: Kishon Vijay Abraham I <kishon@ti.com>
To: Kamil Debski <k.debski@samsung.com>
Cc: 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, kyungmin.park@samsung.com,
t.figa@samsung.com, s.nawrocki@samsung.com,
m.szyprowski@samsung.com, gautam.vivek@samsung.com,
mat.krawczuk@gmail.com
Subject: Re: [PATCH 5/5] usb: s3c-hsotg: Use the new Exynos USB phy driver with the generic phy framework
Date: Fri, 25 Oct 2013 21:23:56 +0530 [thread overview]
Message-ID: <526A9414.6070000@ti.com> (raw)
In-Reply-To: <1382710529-12082-6-git-send-email-k.debski@samsung.com>
On Friday 25 October 2013 07:45 PM, Kamil Debski wrote:
> 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
> +
empty blank line.
> * @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;
Apart from that one minor comment, this patch looks good.
Thanks
Kishon
prev parent reply other threads:[~2013-10-25 15:53 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
[not found] ` <1382710529-12082-1-git-send-email-k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-25 14:15 ` [PATCH v2 1/5] " Kamil Debski
[not found] ` <1382710529-12082-2-git-send-email-k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-25 15:39 ` Kishon Vijay Abraham I
[not found] ` <526A90B9.3040501-l0cyMroinI0@public.gmane.org>
2013-10-28 13:52 ` Kamil Debski
2013-10-28 20:00 ` Tomasz Figa
2013-10-29 10:16 ` Kamil Debski
[not found] ` <025b01ced3e4$ec685db0$c5391910$%debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
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
[not found] ` <1382710529-12082-3-git-send-email-k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-25 15:43 ` Kishon Vijay Abraham I
[not found] ` <526A91B9.1060901-l0cyMroinI0@public.gmane.org>
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
[not found] ` <1382710529-12082-4-git-send-email-k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-25 15:50 ` Kishon Vijay Abraham I
[not found] ` <526A933C.4020904-l0cyMroinI0@public.gmane.org>
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
[not found] ` <003101ced1ea$85f7e010$91e7a030$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-28 13:52 ` Kamil Debski
[not found] ` <1382710529-12082-5-git-send-email-k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-26 9:41 ` Vivek Gautam
2013-10-28 13:53 ` Kamil Debski
[not found] ` <025f01ced3e5$0660ecf0$1322c6d0$%debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-28 14:36 ` Vivek Gautam
2013-10-25 14:15 ` [PATCH 5/5] usb: s3c-hsotg: Use the new Exynos USB phy driver with " Kamil Debski
2013-10-25 15:53 ` Kishon Vijay Abraham I [this message]
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=526A9414.6070000@ti.com \
--to=kishon@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=gautam.vivek@samsung.com \
--cc=k.debski@samsung.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).