linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: lpc32xx: allow peripheral clock selection in device tree
@ 2016-06-03 19:34 Sylvain Lemieux
  2016-06-21  4:28 ` Vladimir Zapolskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Sylvain Lemieux @ 2016-06-03 19:34 UTC (permalink / raw)
  To: vz, sboyd, mturquette; +Cc: linux-arm-kernel, linux-clk

From: Sylvain Lemieux <slemieux@tycoint.com>

This patch add the support to select the peripheral clock (PERIPH)
as a parent clock source using the "assigned-clock-parents"
parameter in the device tree.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
 drivers/clk/nxp/clk-lpc32xx.c             | 3 +--
 include/dt-bindings/clock/lpc32xx-clock.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/nxp/clk-lpc32xx.c b/drivers/clk/nxp/clk-lpc32xx.c
index 481b264..90d740a 100644
--- a/drivers/clk/nxp/clk-lpc32xx.c
+++ b/drivers/clk/nxp/clk-lpc32xx.c
@@ -87,7 +87,7 @@ enum {
 
 enum {
 	/* Start from the last defined clock in dt bindings */
-	LPC32XX_CLK_ADC_DIV = LPC32XX_CLK_HCLK_PLL + 1,
+	LPC32XX_CLK_ADC_DIV = LPC32XX_CLK_PERIPH + 1,
 	LPC32XX_CLK_ADC_RTC,
 	LPC32XX_CLK_TEST1,
 	LPC32XX_CLK_TEST2,
@@ -99,7 +99,6 @@ enum {
 	LPC32XX_CLK_HCLK_DIV_PERIPH,
 	LPC32XX_CLK_HCLK_DIV,
 	LPC32XX_CLK_HCLK,
-	LPC32XX_CLK_PERIPH,
 	LPC32XX_CLK_ARM,
 	LPC32XX_CLK_ARM_VFP,
 
diff --git a/include/dt-bindings/clock/lpc32xx-clock.h b/include/dt-bindings/clock/lpc32xx-clock.h
index d41b6fe..e624d3a 100644
--- a/include/dt-bindings/clock/lpc32xx-clock.h
+++ b/include/dt-bindings/clock/lpc32xx-clock.h
@@ -48,6 +48,7 @@
 #define LPC32XX_CLK_PWM2	33
 #define LPC32XX_CLK_ADC		34
 #define LPC32XX_CLK_HCLK_PLL	35
+#define LPC32XX_CLK_PERIPH	36
 
 /* LPC32XX USB clocks */
 #define LPC32XX_USB_CLK_I2C	1
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: lpc32xx: allow peripheral clock selection in device tree
  2016-06-03 19:34 [PATCH] clk: lpc32xx: allow peripheral clock selection in device tree Sylvain Lemieux
@ 2016-06-21  4:28 ` Vladimir Zapolskiy
  2016-06-21 12:35   ` Sylvain Lemieux
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Zapolskiy @ 2016-06-21  4:28 UTC (permalink / raw)
  To: Sylvain Lemieux, sboyd, mturquette; +Cc: linux-arm-kernel, linux-clk

Hi Sylvain,

On 03.06.2016 22:34, Sylvain Lemieux wrote:
> From: Sylvain Lemieux <slemieux@tycoint.com>
> 
> This patch add the support to select the peripheral clock (PERIPH)
> as a parent clock source using the "assigned-clock-parents"
> parameter in the device tree.
> 
> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

The change looks good, is it done to support a selection of PWM parent clocks?

I think it makes sense to set PERIPH clock as a default parent for both
PWM controllers, please consider to send a DTS change.


Best wishes,
Vladimir

> ---
>  drivers/clk/nxp/clk-lpc32xx.c             | 3 +--
>  include/dt-bindings/clock/lpc32xx-clock.h | 1 +
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/nxp/clk-lpc32xx.c b/drivers/clk/nxp/clk-lpc32xx.c
> index 481b264..90d740a 100644
> --- a/drivers/clk/nxp/clk-lpc32xx.c
> +++ b/drivers/clk/nxp/clk-lpc32xx.c
> @@ -87,7 +87,7 @@ enum {
>  
>  enum {
>  	/* Start from the last defined clock in dt bindings */
> -	LPC32XX_CLK_ADC_DIV = LPC32XX_CLK_HCLK_PLL + 1,
> +	LPC32XX_CLK_ADC_DIV = LPC32XX_CLK_PERIPH + 1,
>  	LPC32XX_CLK_ADC_RTC,
>  	LPC32XX_CLK_TEST1,
>  	LPC32XX_CLK_TEST2,
> @@ -99,7 +99,6 @@ enum {
>  	LPC32XX_CLK_HCLK_DIV_PERIPH,
>  	LPC32XX_CLK_HCLK_DIV,
>  	LPC32XX_CLK_HCLK,
> -	LPC32XX_CLK_PERIPH,
>  	LPC32XX_CLK_ARM,
>  	LPC32XX_CLK_ARM_VFP,
>  
> diff --git a/include/dt-bindings/clock/lpc32xx-clock.h b/include/dt-bindings/clock/lpc32xx-clock.h
> index d41b6fe..e624d3a 100644
> --- a/include/dt-bindings/clock/lpc32xx-clock.h
> +++ b/include/dt-bindings/clock/lpc32xx-clock.h
> @@ -48,6 +48,7 @@
>  #define LPC32XX_CLK_PWM2	33
>  #define LPC32XX_CLK_ADC		34
>  #define LPC32XX_CLK_HCLK_PLL	35
> +#define LPC32XX_CLK_PERIPH	36
>  
>  /* LPC32XX USB clocks */
>  #define LPC32XX_USB_CLK_I2C	1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: lpc32xx: allow peripheral clock selection in device tree
  2016-06-21  4:28 ` Vladimir Zapolskiy
@ 2016-06-21 12:35   ` Sylvain Lemieux
  2016-07-04 13:43     ` Sylvain Lemieux
  0 siblings, 1 reply; 4+ messages in thread
From: Sylvain Lemieux @ 2016-06-21 12:35 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: sboyd, mturquette, linux-arm-kernel, linux-clk

Hi Vladimir,

On Tue, 2016-06-21 at 07:28 +0300, Vladimir Zapolskiy wrote:
> Hi Sylvain,
> 
> On 03.06.2016 22:34, Sylvain Lemieux wrote:
> > From: Sylvain Lemieux <slemieux@tycoint.com>
> > 
> > This patch add the support to select the peripheral clock (PERIPH)
> > as a parent clock source using the "assigned-clock-parents"
> > parameter in the device tree.
> > 
> > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> 
> Acked-by: Vladimir Zapolskiy <vz@mleia.com>
> 
> The change looks good, is it done to support a selection of PWM parent clocks?

Yes, this is the case.
> 
> I think it makes sense to set PERIPH clock as a default parent for both
> PWM controllers, please consider to send a DTS change.

I will do.

Thanks for the feedback,
Sylvain

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: lpc32xx: allow peripheral clock selection in device tree
  2016-06-21 12:35   ` Sylvain Lemieux
@ 2016-07-04 13:43     ` Sylvain Lemieux
  0 siblings, 0 replies; 4+ messages in thread
From: Sylvain Lemieux @ 2016-07-04 13:43 UTC (permalink / raw)
  To: sboyd; +Cc: Vladimir Zapolskiy, mturquette, linux-arm-kernel, linux-clk

Hi Stephan,

On Tue, 2016-06-21 at 08:35 -0400, Sylvain Lemieux wrote:
> Hi Vladimir,
> 
> On Tue, 2016-06-21 at 07:28 +0300, Vladimir Zapolskiy wrote:
> > Hi Sylvain,
> > 
> > On 03.06.2016 22:34, Sylvain Lemieux wrote:
> > > From: Sylvain Lemieux <slemieux@tycoint.com>
> > > 
> > > This patch add the support to select the peripheral clock (PERIPH)
> > > as a parent clock source using the "assigned-clock-parents"
> > > parameter in the device tree.
> > > 
> > > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> > 
> > Acked-by: Vladimir Zapolskiy <vz@mleia.com>
> > 
> > The change looks good, is it done to support a selection of PWM parent clocks?
> 
> Yes, this is the case.
> > 
> > I think it makes sense to set PERIPH clock as a default parent for both
> > PWM controllers, please consider to send a DTS change.
> 
> I will do.
> 
> Thanks for the feedback,
> Sylvain
> 
do you think you can take this change for 4.8?


Regards,
Sylvain

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-04 13:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03 19:34 [PATCH] clk: lpc32xx: allow peripheral clock selection in device tree Sylvain Lemieux
2016-06-21  4:28 ` Vladimir Zapolskiy
2016-06-21 12:35   ` Sylvain Lemieux
2016-07-04 13:43     ` Sylvain Lemieux

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).