All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] Drivers: MUSB: Davinci MUSB: added DT support
Date: Thu, 21 Jan 2016 21:05:29 +0300	[thread overview]
Message-ID: <56A11DE9.6060406@cogentembedded.com> (raw)
In-Reply-To: <1453387999-4485-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>

Hello.

On 01/21/2016 05:53 PM, Petr Kulhavy wrote:

> TI DaVinci MUSB driver equipped with DeviceTree support.
> Tested with AM1808 board and USB2.0 (OTG) in host mode.
>
> Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
> ---
>   .../devicetree/bindings/usb/da8xx-usb.txt          |  52 +++++++
>   drivers/usb/musb/da8xx.c                           | 166 +++++++++++++++++++++

    DA8xx is not a real DaVinci. DaVincis have their own glue layer, davinci.c.

>   include/linux/platform_data/usb-davinci.h          |   3 +-
>   3 files changed, 220 insertions(+), 1 deletion(-)
>   create mode 100644 Documentation/devicetree/bindings/usb/da8xx-usb.txt

[...]
> diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
> index 4e13fe2..2c00e98 100644
> --- a/drivers/usb/musb/da8xx.c
> +++ b/drivers/usb/musb/da8xx.c
[...]
> @@ -627,11 +777,27 @@ static int da8xx_remove(struct platform_device *pdev)
>   	return 0;
>   }
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id da8xx_id_table[] = {
> +	{
> +		.compatible = "ti,da850-musb"
> +	},
> +	{
> +		.compatible = "ti,da830-musb"
> +	},

    What's the difference b/w DA830 and DA850? You don't seem to differ them...

> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, da8xx_id_table);
> +#endif
> +
>   static struct platform_driver da8xx_driver = {
>   	.probe		= da8xx_probe,
>   	.remove		= da8xx_remove,
>   	.driver		= {
>   		.name	= "musb-da8xx",
> +#ifdef CONFIG_OF
> +		.of_match_table = of_match_ptr(da8xx_id_table),
> +#endif

    With of_match_ptr() you shouldn't need this #ifdef.

[...]
> diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h
> index e0bc4ab..bd2a5a9 100644
> --- a/include/linux/platform_data/usb-davinci.h
> +++ b/include/linux/platform_data/usb-davinci.h
> @@ -21,7 +21,8 @@
>   #define CFGCHIP2_FORCE_DEVICE 	(2 << 13)
>   #define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
>   #define CFGCHIP2_USB1PHYCLKMUX	(1 << 12)
> -#define CFGCHIP2_USB2PHYCLKMUX	(1 << 11)
> +#define CFGCHIP2_USB2PHYCLKMUX_OFFSET	(11)

    I'd prefer *_SHIFT if you must #define it.

> +#define CFGCHIP2_USB2PHYCLKMUX	(1 << CFGCHIP2_USB2PHYCLKMUX_OFFSET)
>   #define CFGCHIP2_PHYPWRDN	(1 << 10)
>   #define CFGCHIP2_OTGPWRDN	(1 << 9)
>   #define CFGCHIP2_DATPOL 	(1 << 8)

    More comments later, when the time permits...

MBR, 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

  parent reply	other threads:[~2016-01-21 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 14:53 [PATCH 2/2] Drivers: MUSB: Davinci MUSB: added DT support Petr Kulhavy
     [not found] ` <1453387999-4485-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-01-21 18:05   ` Sergei Shtylyov [this message]
2016-01-21 23:07   ` Rob Herring
2016-01-22  9:01     ` Petr Kulhavy
2016-01-22  9:03     ` Petr Kulhavy
2016-01-24 19:00     ` Sergei Shtylyov

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=56A11DE9.6060406@cogentembedded.com \
    --to=sergei.shtylyov-m4dtvfq/zs1mrggop+s0pdbpr1lh4cv8@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@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.