linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] clk: Add PWM clock driver
@ 2014-09-10 20:05 Janusz Użycki
       [not found] ` <5410AEFD.5030302-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Janusz Użycki @ 2014-09-10 20:05 UTC (permalink / raw)
  To: Thierry Reding, Mike Turquette
  Cc: Philipp Zabel, linux-kernel, devicetree, linux-pwm

Hi,

http://patchwork.ozlabs.org/patch/359069/
https://lkml.org/lkml/2014/6/12/186

Will the patch ever included to linux-next?

pwm_config()  API could be extended to support
not only period [ns] and duty [ns] time
but also frequency [Hz] and duty cycle fraction [1/1000?]
(instead of time in ns) as parameters.
Then  ns (rounded by pwm) to freq. conversion problem
inclk_pwm_recalc_rate() usingpwm_get_period()
could be avoided.
To extend the API pwm_config() can support
new flags forduty_ns and period_ns,
eg. PWM_DUTY_PERCENT and PWM_PERIOD_HZ.


best regards
Janusz


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

* Re: [PATCH] clk: Add PWM clock driver
       [not found] ` <5410AEFD.5030302-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
@ 2014-09-23  8:51   ` Thierry Reding
  2014-09-27 20:01     ` Mike Turquette
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2014-09-23  8:51 UTC (permalink / raw)
  To: Janusz Użycki
  Cc: Mike Turquette, Philipp Zabel,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

On Wed, Sep 10, 2014 at 10:05:17PM +0200, Janusz Użycki wrote:
> Hi,
> 
> http://patchwork.ozlabs.org/patch/359069/
> https://lkml.org/lkml/2014/6/12/186
> 
> Will the patch ever included to linux-next?

I've never seen this patch before. From a quick look it doesn't seem
like it would work as is, but the idea is certainly interesting. If
somebody decides to continue work on it, please Cc me and the linux-pwm
mailing list.

> pwm_config()  API could be extended to support
> not only period [ns] and duty [ns] time
> but also frequency [Hz] and duty cycle fraction [1/1000?]
> (instead of time in ns) as parameters.
> Then  ns (rounded by pwm) to freq. conversion problem
> inclk_pwm_recalc_rate() usingpwm_get_period()
> could be avoided.
> To extend the API pwm_config() can support
> new flags forduty_ns and period_ns,
> eg. PWM_DUTY_PERCENT and PWM_PERIOD_HZ.

Is that rounding really a problem? Also the PWM chips will most likely
use the concept of period and duty-cycle internally anyway, so it will
convert back from Hz/percentage to nanoseconds and fall victim to
similar rounding effects.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] clk: Add PWM clock driver
  2014-09-23  8:51   ` Thierry Reding
@ 2014-09-27 20:01     ` Mike Turquette
  2014-11-03 17:45       ` Janusz Użycki
  2014-11-04 11:55       ` Philipp Zabel
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Turquette @ 2014-09-27 20:01 UTC (permalink / raw)
  To: Thierry Reding, Janusz Użycki
  Cc: Philipp Zabel, linux-kernel, devicetree, linux-pwm

Quoting Thierry Reding (2014-09-23 01:51:31)
> On Wed, Sep 10, 2014 at 10:05:17PM +0200, Janusz Użycki wrote:
> > Hi,
> > 
> > http://patchwork.ozlabs.org/patch/359069/
> > https://lkml.org/lkml/2014/6/12/186
> > 
> > Will the patch ever included to linux-next?
> 
> I've never seen this patch before. From a quick look it doesn't seem
> like it would work as is, but the idea is certainly interesting. If
> somebody decides to continue work on it, please Cc me and the linux-pwm
> mailing list.

I just merged a gpio-controlled clock gate and I'm fine with a PWM clock
output.

Janusz, how are you testing the clock driver?

Regards,
Mike

> 
> > pwm_config()  API could be extended to support
> > not only period [ns] and duty [ns] time
> > but also frequency [Hz] and duty cycle fraction [1/1000?]
> > (instead of time in ns) as parameters.
> > Then  ns (rounded by pwm) to freq. conversion problem
> > inclk_pwm_recalc_rate() usingpwm_get_period()
> > could be avoided.
> > To extend the API pwm_config() can support
> > new flags forduty_ns and period_ns,
> > eg. PWM_DUTY_PERCENT and PWM_PERIOD_HZ.
> 
> Is that rounding really a problem? Also the PWM chips will most likely
> use the concept of period and duty-cycle internally anyway, so it will
> convert back from Hz/percentage to nanoseconds and fall victim to
> similar rounding effects.
> 
> Thierry

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

* Re: [PATCH] clk: Add PWM clock driver
  2014-09-27 20:01     ` Mike Turquette
@ 2014-11-03 17:45       ` Janusz Użycki
  2014-11-04 11:55       ` Philipp Zabel
  1 sibling, 0 replies; 5+ messages in thread
From: Janusz Użycki @ 2014-11-03 17:45 UTC (permalink / raw)
  To: Mike Turquette, Thierry Reding
  Cc: Philipp Zabel, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA


W dniu 2014-09-27 o 22:01, Mike Turquette pisze:
> Quoting Thierry Reding (2014-09-23 01:51:31)
>> On Wed, Sep 10, 2014 at 10:05:17PM +0200, Janusz Użycki wrote:
>>> Hi,
>>>
>>> http://patchwork.ozlabs.org/patch/359069/
>>> https://lkml.org/lkml/2014/6/12/186
>>>
>>> Will the patch ever included to linux-next?
>> I've never seen this patch before. From a quick look it doesn't seem
>> like it would work as is, but the idea is certainly interesting. If
>> somebody decides to continue work on it, please Cc me and the linux-pwm
>> mailing list.
> I just merged a gpio-controlled clock gate and I'm fine with a PWM clock
> output.
>
> Janusz, how are you testing the clock driver?

Sorry, I didn't noticed the email.
I didn't test the patch yet. However I plan to check it this year.

best regards
Janusz

>
> Regards,
> Mike
>
>>> pwm_config()  API could be extended to support
>>> not only period [ns] and duty [ns] time
>>> but also frequency [Hz] and duty cycle fraction [1/1000?]
>>> (instead of time in ns) as parameters.
>>> Then  ns (rounded by pwm) to freq. conversion problem
>>> inclk_pwm_recalc_rate() usingpwm_get_period()
>>> could be avoided.
>>> To extend the API pwm_config() can support
>>> new flags forduty_ns and period_ns,
>>> eg. PWM_DUTY_PERCENT and PWM_PERIOD_HZ.
>> Is that rounding really a problem? Also the PWM chips will most likely
>> use the concept of period and duty-cycle internally anyway, so it will
>> convert back from Hz/percentage to nanoseconds and fall victim to
>> similar rounding effects.
>>
>> Thierry
>

--
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] 5+ messages in thread

* Re: [PATCH] clk: Add PWM clock driver
  2014-09-27 20:01     ` Mike Turquette
  2014-11-03 17:45       ` Janusz Użycki
@ 2014-11-04 11:55       ` Philipp Zabel
  1 sibling, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2014-11-04 11:55 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Thierry Reding, Janusz Użycki, linux-kernel, devicetree,
	linux-pwm

Am Samstag, den 27.09.2014, 13:01 -0700 schrieb Mike Turquette:
> Quoting Thierry Reding (2014-09-23 01:51:31)
> > On Wed, Sep 10, 2014 at 10:05:17PM +0200, Janusz Użycki wrote:
> > > Hi,
> > > 
> > > http://patchwork.ozlabs.org/patch/359069/
> > > https://lkml.org/lkml/2014/6/12/186
> > > 
> > > Will the patch ever included to linux-next?
> > 
> > I've never seen this patch before. From a quick look it doesn't seem
> > like it would work as is, but the idea is certainly interesting. If
> > somebody decides to continue work on it, please Cc me and the linux-pwm
> > mailing list.
> 
> I just merged a gpio-controlled clock gate and I'm fine with a PWM clock
> output.
> 
> Janusz, how are you testing the clock driver?

On the BoundaryDevices Nitrogen6X board, the master clock to the OV5640
MIPI CSI-2 sensor module has to be provided by a PWM.

regards
Philipp

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

end of thread, other threads:[~2014-11-04 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 20:05 [PATCH] clk: Add PWM clock driver Janusz Użycki
     [not found] ` <5410AEFD.5030302-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-23  8:51   ` Thierry Reding
2014-09-27 20:01     ` Mike Turquette
2014-11-03 17:45       ` Janusz Użycki
2014-11-04 11:55       ` Philipp Zabel

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