* [PATCH 0/3] pwm: lpc32xx: switch driver to one phandle argument for PWM consumers @ 2016-12-05 1:42 Vladimir Zapolskiy [not found] ` <20161205014237.1689-1-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Vladimir Zapolskiy @ 2016-12-05 1:42 UTC (permalink / raw) To: Thierry Reding, Rob Herring, Sylvain Lemieux Cc: linux-pwm, devicetree, linux-arm-kernel The change adds private of_xlate() function to process one argument given along with a PWM phandle. LPC32xx SoCs have two independent single channel PWM controllers, the argument is used as a description of PWM output frequency, see previous discussion here: http://www.spinics.net/lists/arm-kernel/msg534068.html The changes on actual board dts files are not needed at the moment, because all LPC32xx boards in upstream don't describe any PWM consumers. Vladimir Zapolskiy (3): dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties pwm: lpc32xx: switch driver to one phandle argument for PWM consumers pwm: lpc32xx: remove handling of PWM channels .../devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++ drivers/pwm/pwm-lpc32xx.c | 36 +++++++++++++++------- 2 files changed, 32 insertions(+), 11 deletions(-) -- 2.10.2 ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20161205014237.1689-1-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>]
* [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties [not found] ` <20161205014237.1689-1-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> @ 2016-12-05 1:42 ` Vladimir Zapolskiy [not found] ` <20161205014237.1689-2-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Vladimir Zapolskiy @ 2016-12-05 1:42 UTC (permalink / raw) To: Thierry Reding, Rob Herring, Sylvain Lemieux Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r NXP LPC32xx SoCs have two simple independent PWM controllers with a single output each, in this case there is no need to specify PWM channel argument on client side, one cell for setting PWM output frequency is sufficient. Another added to the description property 'clocks' has a standard meaning of a controller supply clock, in the LPC32xx User's Manual the clock is denoted as PWM1_CLK or PWM2_CLK clock. Signed-off-by: Vladimir Zapolskiy <vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> --- Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt index 74b5bc5..523d796 100644 --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt @@ -3,15 +3,22 @@ LPC32XX PWM controller Required properties: - compatible: should be "nxp,lpc3220-pwm" - reg: physical base address and length of the controller's registers +- clocks: clock phandle and clock specifier pair +- #pwm-cells: should be 1, the cell is used to specify the period in + nanoseconds. Examples: pwm@4005c000 { compatible = "nxp,lpc3220-pwm"; reg = <0x4005c000 0x4>; + clocks = <&clk LPC32XX_CLK_PWM1>; + #pwm-cells = <1>; }; pwm@4005c004 { compatible = "nxp,lpc3220-pwm"; reg = <0x4005c004 0x4>; + clocks = <&clk LPC32XX_CLK_PWM2>; + #pwm-cells = <1>; }; -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <20161205014237.1689-2-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties [not found] ` <20161205014237.1689-2-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> @ 2016-12-07 17:56 ` Sylvain Lemieux 2016-12-09 21:41 ` Rob Herring 1 sibling, 0 replies; 9+ messages in thread From: Sylvain Lemieux @ 2016-12-07 17:56 UTC (permalink / raw) To: Vladimir Zapolskiy Cc: Thierry Reding, Rob Herring, linux-pwm-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Mon, 2016-12-05 at 03:42 +0200, Vladimir Zapolskiy wrote: > NXP LPC32xx SoCs have two simple independent PWM controllers with a single > output each, in this case there is no need to specify PWM channel argument > on client side, one cell for setting PWM output frequency is sufficient. > > Another added to the description property 'clocks' has a standard meaning > of a controller supply clock, in the LPC32xx User's Manual the clock is > denoted as PWM1_CLK or PWM2_CLK clock. > > Signed-off-by: Vladimir Zapolskiy <vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> > --- > Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ > 1 file changed, 7 insertions(+) > Reviewed-by: Sylvain Lemieux <slemieux.tyco-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties [not found] ` <20161205014237.1689-2-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> 2016-12-07 17:56 ` Sylvain Lemieux @ 2016-12-09 21:41 ` Rob Herring 2016-12-09 23:51 ` Vladimir Zapolskiy 1 sibling, 1 reply; 9+ messages in thread From: Rob Herring @ 2016-12-09 21:41 UTC (permalink / raw) To: Vladimir Zapolskiy Cc: Thierry Reding, Sylvain Lemieux, linux-pwm-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Mon, Dec 05, 2016 at 03:42:37AM +0200, Vladimir Zapolskiy wrote: > NXP LPC32xx SoCs have two simple independent PWM controllers with a single > output each, in this case there is no need to specify PWM channel argument > on client side, one cell for setting PWM output frequency is sufficient. > > Another added to the description property 'clocks' has a standard meaning > of a controller supply clock, in the LPC32xx User's Manual the clock is > denoted as PWM1_CLK or PWM2_CLK clock. > > Signed-off-by: Vladimir Zapolskiy <vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> > --- > Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > index 74b5bc5..523d796 100644 > --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > @@ -3,15 +3,22 @@ LPC32XX PWM controller > Required properties: > - compatible: should be "nxp,lpc3220-pwm" > - reg: physical base address and length of the controller's registers > +- clocks: clock phandle and clock specifier pair > +- #pwm-cells: should be 1, the cell is used to specify the period in > + nanoseconds. This use of the cell is a bit odd as the period is s/w config and this would typically be a channel selection or such. What if I want user specified/changed periods? Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties 2016-12-09 21:41 ` Rob Herring @ 2016-12-09 23:51 ` Vladimir Zapolskiy 2016-12-21 3:30 ` Vladimir Zapolskiy 0 siblings, 1 reply; 9+ messages in thread From: Vladimir Zapolskiy @ 2016-12-09 23:51 UTC (permalink / raw) To: Rob Herring Cc: Thierry Reding, Sylvain Lemieux, linux-pwm, devicetree, linux-arm-kernel Hi Rob, On 12/09/2016 11:41 PM, Rob Herring wrote: > On Mon, Dec 05, 2016 at 03:42:37AM +0200, Vladimir Zapolskiy wrote: >> NXP LPC32xx SoCs have two simple independent PWM controllers with a single >> output each, in this case there is no need to specify PWM channel argument >> on client side, one cell for setting PWM output frequency is sufficient. >> >> Another added to the description property 'clocks' has a standard meaning >> of a controller supply clock, in the LPC32xx User's Manual the clock is >> denoted as PWM1_CLK or PWM2_CLK clock. >> >> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> >> --- >> Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >> index 74b5bc5..523d796 100644 >> --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >> +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >> @@ -3,15 +3,22 @@ LPC32XX PWM controller >> Required properties: >> - compatible: should be "nxp,lpc3220-pwm" >> - reg: physical base address and length of the controller's registers >> +- clocks: clock phandle and clock specifier pair >> +- #pwm-cells: should be 1, the cell is used to specify the period in >> + nanoseconds. > > This use of the cell is a bit odd as the period is s/w config and this > would typically be a channel selection or such. this is a classic PWM channel configuration property for PWM consumers described in DT, for instance PWM frequency for display panel backlight on boot. I think >90% of PWM controllers with device tree bindings have this argument in #pwm-cells, from bindings/pwm/pwm.txt : pwm-specifier typically encodes the chip-relative PWM number and the PWM period in nanoseconds. You also may skim through phandle arguments of 'pwms' property, commonly the second argument is the requested frequency. In this particular case I just drop PWM channel number, because the LPC32xx PWM controller has a single output channel. > What if I want user specified/changed periods? > The preset period still can be changed over sysfs in runtime. -- With best wishes, Vladimir ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties 2016-12-09 23:51 ` Vladimir Zapolskiy @ 2016-12-21 3:30 ` Vladimir Zapolskiy 2017-01-03 15:22 ` Sylvain Lemieux 0 siblings, 1 reply; 9+ messages in thread From: Vladimir Zapolskiy @ 2016-12-21 3:30 UTC (permalink / raw) To: Rob Herring Cc: Thierry Reding, Sylvain Lemieux, linux-pwm, devicetree, linux-arm-kernel On 12/10/2016 01:51 AM, Vladimir Zapolskiy wrote: > Hi Rob, > > On 12/09/2016 11:41 PM, Rob Herring wrote: >> On Mon, Dec 05, 2016 at 03:42:37AM +0200, Vladimir Zapolskiy wrote: >>> NXP LPC32xx SoCs have two simple independent PWM controllers with a single >>> output each, in this case there is no need to specify PWM channel argument >>> on client side, one cell for setting PWM output frequency is sufficient. >>> >>> Another added to the description property 'clocks' has a standard meaning >>> of a controller supply clock, in the LPC32xx User's Manual the clock is >>> denoted as PWM1_CLK or PWM2_CLK clock. >>> >>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> >>> --- >>> Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ >>> 1 file changed, 7 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >>> index 74b5bc5..523d796 100644 >>> --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >>> +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >>> @@ -3,15 +3,22 @@ LPC32XX PWM controller >>> Required properties: >>> - compatible: should be "nxp,lpc3220-pwm" >>> - reg: physical base address and length of the controller's registers >>> +- clocks: clock phandle and clock specifier pair >>> +- #pwm-cells: should be 1, the cell is used to specify the period in >>> + nanoseconds. >> >> This use of the cell is a bit odd as the period is s/w config and this >> would typically be a channel selection or such. > > this is a classic PWM channel configuration property for PWM consumers > described in DT, for instance PWM frequency for display panel backlight > on boot. > > I think >90% of PWM controllers with device tree bindings have this > argument in #pwm-cells, from bindings/pwm/pwm.txt : > > pwm-specifier typically encodes the chip-relative PWM number and > the PWM period in nanoseconds. > > You also may skim through phandle arguments of 'pwms' property, > commonly the second argument is the requested frequency. > > In this particular case I just drop PWM channel number, because > the LPC32xx PWM controller has a single output channel. > >> What if I want user specified/changed periods? >> > > The preset period still can be changed over sysfs in runtime. Rob, have I managed to answer your questions? If you accept my clarification, could you please ack the change? -- With best wishes, Vladimir ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties 2016-12-21 3:30 ` Vladimir Zapolskiy @ 2017-01-03 15:22 ` Sylvain Lemieux 2017-02-07 19:03 ` Sylvain Lemieux 0 siblings, 1 reply; 9+ messages in thread From: Sylvain Lemieux @ 2017-01-03 15:22 UTC (permalink / raw) To: Vladimir Zapolskiy Cc: Rob Herring, devicetree, Thierry Reding, linux-arm-kernel, linux-pwm Hi Rob, On Wed, 2016-12-21 at 05:30 +0200, Vladimir Zapolskiy wrote: > On 12/10/2016 01:51 AM, Vladimir Zapolskiy wrote: > > Hi Rob, > > > > On 12/09/2016 11:41 PM, Rob Herring wrote: > >> On Mon, Dec 05, 2016 at 03:42:37AM +0200, Vladimir Zapolskiy wrote: > >>> NXP LPC32xx SoCs have two simple independent PWM controllers with a single > >>> output each, in this case there is no need to specify PWM channel argument > >>> on client side, one cell for setting PWM output frequency is sufficient. > >>> > >>> Another added to the description property 'clocks' has a standard meaning > >>> of a controller supply clock, in the LPC32xx User's Manual the clock is > >>> denoted as PWM1_CLK or PWM2_CLK clock. > >>> > >>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> > >>> --- > >>> Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ > >>> 1 file changed, 7 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > >>> index 74b5bc5..523d796 100644 > >>> --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > >>> +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > >>> @@ -3,15 +3,22 @@ LPC32XX PWM controller > >>> Required properties: > >>> - compatible: should be "nxp,lpc3220-pwm" > >>> - reg: physical base address and length of the controller's registers > >>> +- clocks: clock phandle and clock specifier pair > >>> +- #pwm-cells: should be 1, the cell is used to specify the period in > >>> + nanoseconds. > >> > >> This use of the cell is a bit odd as the period is s/w config and this > >> would typically be a channel selection or such. > > > > this is a classic PWM channel configuration property for PWM consumers > > described in DT, for instance PWM frequency for display panel backlight > > on boot. > > > > I think >90% of PWM controllers with device tree bindings have this > > argument in #pwm-cells, from bindings/pwm/pwm.txt : > > > > pwm-specifier typically encodes the chip-relative PWM number and > > the PWM period in nanoseconds. > > > > You also may skim through phandle arguments of 'pwms' property, > > commonly the second argument is the requested frequency. > > > > In this particular case I just drop PWM channel number, because > > the LPC32xx PWM controller has a single output channel. > > > >> What if I want user specified/changed periods? > >> > > > > The preset period still can be changed over sysfs in runtime. > > Rob, have I managed to answer your questions? > > If you accept my clarification, could you please ack the change? > > -- > With best wishes, > Vladimir > ping Sylvain ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties 2017-01-03 15:22 ` Sylvain Lemieux @ 2017-02-07 19:03 ` Sylvain Lemieux 2017-02-07 23:22 ` Rob Herring 0 siblings, 1 reply; 9+ messages in thread From: Sylvain Lemieux @ 2017-02-07 19:03 UTC (permalink / raw) To: Rob Herring, Vladimir Zapolskiy Cc: Thierry Reding, linux-pwm, devicetree, linux-arm-kernel Hi Rob, On Tue, 2017-01-03 at 10:22 -0500, Sylvain Lemieux wrote: > Hi Rob, > > On Wed, 2016-12-21 at 05:30 +0200, Vladimir Zapolskiy wrote: > > On 12/10/2016 01:51 AM, Vladimir Zapolskiy wrote: > > > Hi Rob, > > > > > > On 12/09/2016 11:41 PM, Rob Herring wrote: > > >> On Mon, Dec 05, 2016 at 03:42:37AM +0200, Vladimir Zapolskiy wrote: > > >>> NXP LPC32xx SoCs have two simple independent PWM controllers with a single > > >>> output each, in this case there is no need to specify PWM channel argument > > >>> on client side, one cell for setting PWM output frequency is sufficient. > > >>> > > >>> Another added to the description property 'clocks' has a standard meaning > > >>> of a controller supply clock, in the LPC32xx User's Manual the clock is > > >>> denoted as PWM1_CLK or PWM2_CLK clock. > > >>> > > >>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> > > >>> --- > > >>> Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ > > >>> 1 file changed, 7 insertions(+) > > >>> > > >>> diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > > >>> index 74b5bc5..523d796 100644 > > >>> --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > > >>> +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt > > >>> @@ -3,15 +3,22 @@ LPC32XX PWM controller > > >>> Required properties: > > >>> - compatible: should be "nxp,lpc3220-pwm" > > >>> - reg: physical base address and length of the controller's registers > > >>> +- clocks: clock phandle and clock specifier pair > > >>> +- #pwm-cells: should be 1, the cell is used to specify the period in > > >>> + nanoseconds. > > >> > > >> This use of the cell is a bit odd as the period is s/w config and this > > >> would typically be a channel selection or such. > > > > > > this is a classic PWM channel configuration property for PWM consumers > > > described in DT, for instance PWM frequency for display panel backlight > > > on boot. > > > > > > I think >90% of PWM controllers with device tree bindings have this > > > argument in #pwm-cells, from bindings/pwm/pwm.txt : > > > > > > pwm-specifier typically encodes the chip-relative PWM number and > > > the PWM period in nanoseconds. > > > > > > You also may skim through phandle arguments of 'pwms' property, > > > commonly the second argument is the requested frequency. > > > > > > In this particular case I just drop PWM channel number, because > > > the LPC32xx PWM controller has a single output channel. > > > > > >> What if I want user specified/changed periods? > > >> > > > > > > The preset period still can be changed over sysfs in runtime. > > > > Rob, have I managed to answer your questions? > > > > If you accept my clarification, could you please ack the change? > > > > -- > > With best wishes, > > Vladimir > > > ping > > Sylvain > Can you provide feedback; I think your questions were answered by Vladimir. Regards, Sylvain ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties 2017-02-07 19:03 ` Sylvain Lemieux @ 2017-02-07 23:22 ` Rob Herring 0 siblings, 0 replies; 9+ messages in thread From: Rob Herring @ 2017-02-07 23:22 UTC (permalink / raw) To: Sylvain Lemieux Cc: Vladimir Zapolskiy, Thierry Reding, Linux PWM List, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Tue, Feb 7, 2017 at 1:03 PM, Sylvain Lemieux <slemieux.tyco@gmail.com> wrote: > Hi Rob, > > On Tue, 2017-01-03 at 10:22 -0500, Sylvain Lemieux wrote: >> Hi Rob, >> >> On Wed, 2016-12-21 at 05:30 +0200, Vladimir Zapolskiy wrote: >> > On 12/10/2016 01:51 AM, Vladimir Zapolskiy wrote: >> > > Hi Rob, >> > > >> > > On 12/09/2016 11:41 PM, Rob Herring wrote: >> > >> On Mon, Dec 05, 2016 at 03:42:37AM +0200, Vladimir Zapolskiy wrote: >> > >>> NXP LPC32xx SoCs have two simple independent PWM controllers with a single >> > >>> output each, in this case there is no need to specify PWM channel argument >> > >>> on client side, one cell for setting PWM output frequency is sufficient. >> > >>> >> > >>> Another added to the description property 'clocks' has a standard meaning >> > >>> of a controller supply clock, in the LPC32xx User's Manual the clock is >> > >>> denoted as PWM1_CLK or PWM2_CLK clock. >> > >>> >> > >>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> >> > >>> --- >> > >>> Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt | 7 +++++++ >> > >>> 1 file changed, 7 insertions(+) >> > >>> >> > >>> diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >> > >>> index 74b5bc5..523d796 100644 >> > >>> --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >> > >>> +++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt >> > >>> @@ -3,15 +3,22 @@ LPC32XX PWM controller >> > >>> Required properties: >> > >>> - compatible: should be "nxp,lpc3220-pwm" >> > >>> - reg: physical base address and length of the controller's registers >> > >>> +- clocks: clock phandle and clock specifier pair >> > >>> +- #pwm-cells: should be 1, the cell is used to specify the period in >> > >>> + nanoseconds. >> > >> >> > >> This use of the cell is a bit odd as the period is s/w config and this >> > >> would typically be a channel selection or such. >> > > >> > > this is a classic PWM channel configuration property for PWM consumers >> > > described in DT, for instance PWM frequency for display panel backlight >> > > on boot. >> > > >> > > I think >90% of PWM controllers with device tree bindings have this >> > > argument in #pwm-cells, from bindings/pwm/pwm.txt : >> > > >> > > pwm-specifier typically encodes the chip-relative PWM number and >> > > the PWM period in nanoseconds. >> > > >> > > You also may skim through phandle arguments of 'pwms' property, >> > > commonly the second argument is the requested frequency. >> > > >> > > In this particular case I just drop PWM channel number, because >> > > the LPC32xx PWM controller has a single output channel. >> > > >> > >> What if I want user specified/changed periods? >> > >> >> > > >> > > The preset period still can be changed over sysfs in runtime. >> > >> > Rob, have I managed to answer your questions? >> > >> > If you accept my clarification, could you please ack the change? >> > >> > -- >> > With best wishes, >> > Vladimir >> > >> ping >> >> Sylvain >> > Can you provide feedback; I think your questions were answered > by Vladimir. Yes. Sorry for the delay. It's best to resend if you want to be sure I see it. Acked-by: Rob Herring <robh@kernel.org> Rob ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-02-07 23:22 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-05 1:42 [PATCH 0/3] pwm: lpc32xx: switch driver to one phandle argument for PWM consumers Vladimir Zapolskiy [not found] ` <20161205014237.1689-1-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> 2016-12-05 1:42 ` [PATCH 1/3] dt: pwm: lpc32xx: add description of clocks and #pwm-cells properties Vladimir Zapolskiy [not found] ` <20161205014237.1689-2-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> 2016-12-07 17:56 ` Sylvain Lemieux 2016-12-09 21:41 ` Rob Herring 2016-12-09 23:51 ` Vladimir Zapolskiy 2016-12-21 3:30 ` Vladimir Zapolskiy 2017-01-03 15:22 ` Sylvain Lemieux 2017-02-07 19:03 ` Sylvain Lemieux 2017-02-07 23:22 ` Rob Herring
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).