Skip to contentSkip to conversation

clk: Add PWM clock driver

PATCH Janusz Użycki 4 participants 5 messages Sep 10, 2014 – Nov 4, 2014 PWM

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 6 lines · Janusz Użycki

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.

Quoted 10 lines

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

#2 lore raw

Quoting Thierry Reding (2014-09-23 01:51:31)

Quoted 6 lines · Janusz Użycki
Quoted 5 lines

Hi,

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

Quoted 6 lines
Quoted 1 line

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

Quoted 18 lines
Quoted 11 lines

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

#3 lore raw

W dniu 2014-09-27 o 22:01, Mike Turquette pisze:

Quoted 8 lines

Quoting Thierry Reding (2014-09-23 01:51:31)

Quoted 7 lines · Janusz Użycki
Quoted 6 lines

Hi,

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

Will the patch ever included to linux-next?

Quoted 8 lines
Quoted 4 lines

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

Quoted 21 lines

Regards,
Mike

Quoted 16 lines
Quoted 10 lines

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Mike Turquette

Am Samstag, den 27.09.2014, 13:01 -0700 schrieb Mike Turquette:

Quoted 14 lines

Quoting Thierry Reding (2014-09-23 01:51:31)

Quoted 6 lines · Janusz Użycki
Quoted 5 lines

Hi,

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

Quoted 6 lines
Quoted 1 line

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.

Quoted 4 lines

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