From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yoshihiro Shimoda
<yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"pawel.moll-5wv7dgnIgG8@public.gmane.org"
<pawel.moll-5wv7dgnIgG8@public.gmane.org>,
"mark.rutland-5wv7dgnIgG8@public.gmane.org"
<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
SH-Linux <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
kuninori morimoto
<kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
Ulrich Hecht
<ulrich.hecht-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v3 2/2] usb: renesas_usbhs: Add device tree support for R-Car H2 and M2
Date: Tue, 30 Sep 2014 21:34:22 +0000 [thread overview]
Message-ID: <542B21DE.4010903@cogentembedded.com> (raw)
In-Reply-To: <542A7D29.3010805-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Hello.
On 09/30/2014 01:51 PM, Yoshihiro Shimoda wrote:
>>> This driver supports other SoCs, but they need boards/Soc depend code.
>>> So, this patch adds device tree support for R-Car H2 and M2 initially.
>>> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>>> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>> ---
>>> drivers/usb/renesas_usbhs/common.c | 44 ++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 44 insertions(+)
>>> diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
>>> index 1b9bf8d..b3b6813 100644
>>> --- a/drivers/usb/renesas_usbhs/common.c
>>> +++ b/drivers/usb/renesas_usbhs/common.c
[...]
>>> @@ -438,6 +440,43 @@ static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev)
>> [...]
>>> +static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
>>> +{
>>> + struct renesas_usbhs_platform_info *info;
>>> + struct renesas_usbhs_driver_param *dparam;
>>> + const struct of_device_id *of_id = of_match_device(usbhs_of_match, dev);
>>> + u32 tmp;
>>> + int gpio;
>>> +
>>> + info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
>>> + if (!info)
>>> + return NULL;
>>> +
>>> + dparam = &info->driver_param;
>>> + dparam->type = of_id ? (u32)of_id->data : 0;
>>> + if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp))
>>> + dparam->buswait_bwait = tmp;
>>> + gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,
>>> + NULL);
>>> + if (gpio > 0)
>>> + dparam->enable_gpio = gpio;
>>> +
>>> + return info;
>> I don't see where you parse the optional "phy" property. It should exist
>> for the Lager and Koelsch boards you target.
> Since I wrote 'phy-names: must be "usb"' in the document,
> I intend to use a fixed property for "phy" driver like the following:
> phy = phy_get(&pdev->dev, "usb");
> Is this a bad code?
Seems OK.
> About using the phy driver in renesas_usbhs driver, I intend to modify
> the drivers/usb/renesas_usbhs/rcar.c.
Hm, it slready supports 'struct usb_phy'. Also PHYs are not limited to
R-Car Gen2 SoCs...
> Best regards,
> Yoshihiro Shimoda
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: Yoshihiro Shimoda
<yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"pawel.moll-5wv7dgnIgG8@public.gmane.org"
<pawel.moll-5wv7dgnIgG8@public.gmane.org>,
"mark.rutland-5wv7dgnIgG8@public.gmane.org"
<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
SH-Linux <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
kuninori morimoto
<kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
Ulrich Hecht
<ulrich.hecht-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v3 2/2] usb: renesas_usbhs: Add device tree support for R-Car H2 and M2
Date: Wed, 01 Oct 2014 01:34:22 +0400 [thread overview]
Message-ID: <542B21DE.4010903@cogentembedded.com> (raw)
In-Reply-To: <542A7D29.3010805-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Hello.
On 09/30/2014 01:51 PM, Yoshihiro Shimoda wrote:
>>> This driver supports other SoCs, but they need boards/Soc depend code.
>>> So, this patch adds device tree support for R-Car H2 and M2 initially.
>>> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
>>> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
>>> ---
>>> drivers/usb/renesas_usbhs/common.c | 44 ++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 44 insertions(+)
>>> diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
>>> index 1b9bf8d..b3b6813 100644
>>> --- a/drivers/usb/renesas_usbhs/common.c
>>> +++ b/drivers/usb/renesas_usbhs/common.c
[...]
>>> @@ -438,6 +440,43 @@ static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev)
>> [...]
>>> +static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
>>> +{
>>> + struct renesas_usbhs_platform_info *info;
>>> + struct renesas_usbhs_driver_param *dparam;
>>> + const struct of_device_id *of_id = of_match_device(usbhs_of_match, dev);
>>> + u32 tmp;
>>> + int gpio;
>>> +
>>> + info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
>>> + if (!info)
>>> + return NULL;
>>> +
>>> + dparam = &info->driver_param;
>>> + dparam->type = of_id ? (u32)of_id->data : 0;
>>> + if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp))
>>> + dparam->buswait_bwait = tmp;
>>> + gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,
>>> + NULL);
>>> + if (gpio > 0)
>>> + dparam->enable_gpio = gpio;
>>> +
>>> + return info;
>> I don't see where you parse the optional "phy" property. It should exist
>> for the Lager and Koelsch boards you target.
> Since I wrote 'phy-names: must be "usb"' in the document,
> I intend to use a fixed property for "phy" driver like the following:
> phy = phy_get(&pdev->dev, "usb");
> Is this a bad code?
Seems OK.
> About using the phy driver in renesas_usbhs driver, I intend to modify
> the drivers/usb/renesas_usbhs/rcar.c.
Hm, it slready supports 'struct usb_phy'. Also PHYs are not limited to
R-Car Gen2 SoCs...
> Best regards,
> Yoshihiro Shimoda
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-30 21:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 5:25 [PATCH v3 2/2] usb: renesas_usbhs: Add device tree support for R-Car H2 and M2 Yoshihiro Shimoda
2014-09-03 5:25 ` Yoshihiro Shimoda
[not found] ` <5406A664.2050501-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-09-29 16:35 ` Sergei Shtylyov
2014-09-29 16:35 ` Sergei Shtylyov
2014-09-30 9:51 ` Yoshihiro Shimoda
2014-09-30 9:51 ` Yoshihiro Shimoda
[not found] ` <542A7D29.3010805-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-09-30 21:34 ` Sergei Shtylyov [this message]
2014-09-30 21:34 ` Sergei Shtylyov
[not found] ` <542B21DE.4010903-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-10-01 19:22 ` Sergei Shtylyov
2014-10-01 19:22 ` Sergei Shtylyov
2014-10-02 0:05 ` Yoshihiro Shimoda
2014-10-02 0:05 ` Yoshihiro Shimoda
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=542B21DE.4010903@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=ulrich.hecht-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.