All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sekhar Nori <nsekhar@ti.com>
To: David Lechner <david@lechnology.com>,
	Kevin Hilman <khilman@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: Axel Haslam <ahaslam@baylibre.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 14:54:26 +0530	[thread overview]
Message-ID: <64127331-7afd-9af7-60d0-d735aa6af628@ti.com> (raw)
In-Reply-To: <1477451211-31979-2-git-send-email-david@lechnology.com>

On Wednesday 26 October 2016 08:36 AM, David Lechner wrote:

> diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c
> index f141f51..71a6d85 100644
> --- a/arch/arm/mach-davinci/usb-da8xx.c
> +++ b/arch/arm/mach-davinci/usb-da8xx.c
> @@ -1,20 +1,248 @@
>  /*
>   * DA8xx USB
>   */
> -#include <linux/dma-mapping.h>
> +#include <linux/clk.h>
> +#include <linux/delay.h>
>  #include <linux/init.h>
>  #include <linux/platform_data/usb-davinci.h>
>  #include <linux/platform_device.h>
> +#include <linux/mfd/da8xx-cfgchip.h>
>  #include <linux/usb/musb.h>
>  
> +#include <mach/clock.h>
>  #include <mach/common.h>
>  #include <mach/cputype.h>
>  #include <mach/da8xx.h>
> -#include <mach/irqs.h>

Looks like you have cleaned up some unneeded includes. Thats fine, just
mention it in the commit description too, so its clear that it is intended.

Also, when adding new include files, please do it in alphabetical order.

> +static struct clk usb_refclkin = {
> +	.name		= "usb_refclkin",
> +	.set_rate	= davinci_simple_set_rate,
> +};
> +
> +static struct clk_lookup usb_refclkin_lookup =
> +	CLK(NULL, "usb_refclkin", &usb_refclkin);
> +
> +static struct clk usb20_phy_clk = {
> +	.name		= "usb20_phy",
> +	.clk_enable	= usb20_phy_clk_enable,
> +	.clk_disable	= usb20_phy_clk_disable,
> +	.set_parent	= usb20_phy_clk_set_parent,
> +};
> +
> +static struct clk_lookup usb20_phy_clk_lookup =
> +	CLK(NULL, "usb20_phy", &usb20_phy_clk);

NULL device name here is wrong. There is a PHY device that gets added
3/5. The name of that device should appear here. Since that phy device
is the consumer of this clock. You can change the order of patches so
the device appears before the associated clocks.

> +static struct clk usb11_phy_clk = {
> +	.name		= "usb11_phy",
> +	.set_parent	= usb11_phy_clk_set_parent,
> +};
> +
> +static struct clk_lookup usb11_phy_clk_lookup =
> +	CLK(NULL, "usb11_phy", &usb11_phy_clk);

here too, please have the phy device name as the consumer of this clock.

It is okay to have NULL device name for the usb_refclkin since that is a
root clock not associated with any device.

Thanks,
Sekhar

WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar@ti.com>
To: David Lechner <david@lechnology.com>,
	Kevin Hilman <khilman@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Axel Haslam <ahaslam@baylibre.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 14:54:26 +0530	[thread overview]
Message-ID: <64127331-7afd-9af7-60d0-d735aa6af628@ti.com> (raw)
In-Reply-To: <1477451211-31979-2-git-send-email-david@lechnology.com>

On Wednesday 26 October 2016 08:36 AM, David Lechner wrote:

> diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c
> index f141f51..71a6d85 100644
> --- a/arch/arm/mach-davinci/usb-da8xx.c
> +++ b/arch/arm/mach-davinci/usb-da8xx.c
> @@ -1,20 +1,248 @@
>  /*
>   * DA8xx USB
>   */
> -#include <linux/dma-mapping.h>
> +#include <linux/clk.h>
> +#include <linux/delay.h>
>  #include <linux/init.h>
>  #include <linux/platform_data/usb-davinci.h>
>  #include <linux/platform_device.h>
> +#include <linux/mfd/da8xx-cfgchip.h>
>  #include <linux/usb/musb.h>
>  
> +#include <mach/clock.h>
>  #include <mach/common.h>
>  #include <mach/cputype.h>
>  #include <mach/da8xx.h>
> -#include <mach/irqs.h>

Looks like you have cleaned up some unneeded includes. Thats fine, just
mention it in the commit description too, so its clear that it is intended.

Also, when adding new include files, please do it in alphabetical order.

> +static struct clk usb_refclkin = {
> +	.name		= "usb_refclkin",
> +	.set_rate	= davinci_simple_set_rate,
> +};
> +
> +static struct clk_lookup usb_refclkin_lookup =
> +	CLK(NULL, "usb_refclkin", &usb_refclkin);
> +
> +static struct clk usb20_phy_clk = {
> +	.name		= "usb20_phy",
> +	.clk_enable	= usb20_phy_clk_enable,
> +	.clk_disable	= usb20_phy_clk_disable,
> +	.set_parent	= usb20_phy_clk_set_parent,
> +};
> +
> +static struct clk_lookup usb20_phy_clk_lookup =
> +	CLK(NULL, "usb20_phy", &usb20_phy_clk);

NULL device name here is wrong. There is a PHY device that gets added
3/5. The name of that device should appear here. Since that phy device
is the consumer of this clock. You can change the order of patches so
the device appears before the associated clocks.

> +static struct clk usb11_phy_clk = {
> +	.name		= "usb11_phy",
> +	.set_parent	= usb11_phy_clk_set_parent,
> +};
> +
> +static struct clk_lookup usb11_phy_clk_lookup =
> +	CLK(NULL, "usb11_phy", &usb11_phy_clk);

here too, please have the phy device name as the consumer of this clock.

It is okay to have NULL device name for the usb_refclkin since that is a
root clock not associated with any device.

Thanks,
Sekhar

WARNING: multiple messages have this Message-ID (diff)
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 14:54:26 +0530	[thread overview]
Message-ID: <64127331-7afd-9af7-60d0-d735aa6af628@ti.com> (raw)
In-Reply-To: <1477451211-31979-2-git-send-email-david@lechnology.com>

On Wednesday 26 October 2016 08:36 AM, David Lechner wrote:

> diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c
> index f141f51..71a6d85 100644
> --- a/arch/arm/mach-davinci/usb-da8xx.c
> +++ b/arch/arm/mach-davinci/usb-da8xx.c
> @@ -1,20 +1,248 @@
>  /*
>   * DA8xx USB
>   */
> -#include <linux/dma-mapping.h>
> +#include <linux/clk.h>
> +#include <linux/delay.h>
>  #include <linux/init.h>
>  #include <linux/platform_data/usb-davinci.h>
>  #include <linux/platform_device.h>
> +#include <linux/mfd/da8xx-cfgchip.h>
>  #include <linux/usb/musb.h>
>  
> +#include <mach/clock.h>
>  #include <mach/common.h>
>  #include <mach/cputype.h>
>  #include <mach/da8xx.h>
> -#include <mach/irqs.h>

Looks like you have cleaned up some unneeded includes. Thats fine, just
mention it in the commit description too, so its clear that it is intended.

Also, when adding new include files, please do it in alphabetical order.

> +static struct clk usb_refclkin = {
> +	.name		= "usb_refclkin",
> +	.set_rate	= davinci_simple_set_rate,
> +};
> +
> +static struct clk_lookup usb_refclkin_lookup =
> +	CLK(NULL, "usb_refclkin", &usb_refclkin);
> +
> +static struct clk usb20_phy_clk = {
> +	.name		= "usb20_phy",
> +	.clk_enable	= usb20_phy_clk_enable,
> +	.clk_disable	= usb20_phy_clk_disable,
> +	.set_parent	= usb20_phy_clk_set_parent,
> +};
> +
> +static struct clk_lookup usb20_phy_clk_lookup =
> +	CLK(NULL, "usb20_phy", &usb20_phy_clk);

NULL device name here is wrong. There is a PHY device that gets added
3/5. The name of that device should appear here. Since that phy device
is the consumer of this clock. You can change the order of patches so
the device appears before the associated clocks.

> +static struct clk usb11_phy_clk = {
> +	.name		= "usb11_phy",
> +	.set_parent	= usb11_phy_clk_set_parent,
> +};
> +
> +static struct clk_lookup usb11_phy_clk_lookup =
> +	CLK(NULL, "usb11_phy", &usb11_phy_clk);

here too, please have the phy device name as the consumer of this clock.

It is okay to have NULL device name for the usb_refclkin since that is a
root clock not associated with any device.

Thanks,
Sekhar

  parent reply	other threads:[~2016-10-26  9:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26  3:06 [PATCH v6 0/5] da8xx USB PHY platform devices and clocks David Lechner
2016-10-26  3:06 ` David Lechner
2016-10-26  3:06 ` David Lechner
2016-10-26  3:06 ` [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  7:59   ` Sekhar Nori
2016-10-26  7:59     ` Sekhar Nori
2016-10-26  7:59     ` Sekhar Nori
2016-10-26 16:37     ` David Lechner
2016-10-26 16:37       ` David Lechner
2016-10-26 16:37       ` David Lechner
2016-10-26 17:13       ` Sekhar Nori
2016-10-26 17:13         ` Sekhar Nori
2016-10-26 17:13         ` Sekhar Nori
2016-10-26  9:24   ` Sekhar Nori [this message]
2016-10-26  9:24     ` Sekhar Nori
2016-10-26  9:24     ` Sekhar Nori
2016-10-26  3:06 ` [PATCH v6 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  9:58   ` Sekhar Nori
2016-10-26  9:58     ` Sekhar Nori
2016-10-26  9:58     ` Sekhar Nori
2016-10-26  3:06 ` [PATCH v6 3/5] ARM: davinci: da8xx: Add USB PHY " David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  3:06 ` [PATCH v6 4/5] ARM: DTS: da850: Add cfgchip syscon node David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26 10:19   ` Sekhar Nori
2016-10-26 10:19     ` Sekhar Nori
2016-10-26 10:19     ` Sekhar Nori
2016-10-26 16:08   ` David Lechner
2016-10-26 16:08     ` David Lechner
2016-10-26 16:08     ` David Lechner
2016-10-28  8:21     ` Sekhar Nori
2016-10-28  8:21       ` Sekhar Nori
2016-10-28  8:21       ` Sekhar Nori
2016-10-28 17:08       ` Kevin Hilman
2016-10-28 17:08         ` Kevin Hilman
2016-10-28 17:08         ` Kevin Hilman
2016-10-28 17:24         ` David Lechner
2016-10-28 17:24           ` David Lechner
2016-10-28 17:24           ` David Lechner
2016-10-28 20:53           ` Kevin Hilman
2016-10-28 20:53             ` Kevin Hilman
2016-10-26  3:06 ` [PATCH v6 5/5] ARM: DTS: da850: Add usb phy node David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26 10:26   ` Sekhar Nori
2016-10-26 10:26     ` Sekhar Nori
2016-10-26 10:26     ` Sekhar Nori
2016-10-27 15:55     ` David Lechner
2016-10-27 15:55       ` David Lechner

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=64127331-7afd-9af7-60d0-d735aa6af628@ti.com \
    --to=nsekhar@ti.com \
    --cc=ahaslam@baylibre.com \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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 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.