[PATCH v3 4/7] pwm: ntxec: Add driver for PWM function in Netronix EC

Andy Shevchenko andy.shevchenko at gmail.com
Sat Oct 3 04:17:58 EDT 2020


On Sat, Oct 3, 2020 at 2:36 AM Jonathan Neuschäfer
<j.neuschaefer at gmx.net> wrote:
> On Mon, Sep 28, 2020 at 10:35:46AM +0200, Uwe Kleine-König wrote:
> > On Sun, Sep 27, 2020 at 11:10:44PM +0200, Jonathan Neuschäfer wrote:

...

> > You can even check this with an LED using something like:
> >
> >       pwm_apply(mypwm, {.enabled = true, .duty_cycle = $big, .period = $big});
> >       pwm_apply(mypwm, {.enabled = false, ... });
> >
> > . If the period is completed the LED is on for $big ns, if not the LED
> > is on for a timespan that is probably hardly noticable with the human
> > eye.
>
> The longest configurable period is about 8ms, so it's not long enough to
> see anything. However, after writing enable=0, it can take about a
> second for the PWM signal to turn off... this hardware is a bit weird.

Sounds like you have 1/128 divisor and off/on is done on lower
frequency. (We saw PWMs with an additional 7-bit counter, reminds me
Crystal Cove PMIC PWM).

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list