All of lore.kernel.org
 help / color / mirror / Atom feed
* pwm-samsung: incorrect register values for 100% duty cycle
@ 2014-09-17 23:42 Daniel Drake
  2014-10-01 10:55 ` Tomasz Figa
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Drake @ 2014-09-17 23:42 UTC (permalink / raw)
  To: linux-pwm, linux-samsung-soc, Tomasz Figa

Hi,

I'm using pwm-samsung on Exynos4412 for a variable-brightness LED.

When the LED is set to maximum brightness via the pwm-leds driver, we
arrive at pwm_samsung_config with duty_ns = period_ns, i.e. 100% duty
cycle.

This function does:

    /* -1UL will give 100% duty. */
    --tcmp;
    writel(tcmp, our_chip->base + REG_TCMPB(pwm->hwpwm));

I think that comment is incorrect. If tcmp is written as -1UL then the
LED totally turns off. And there is nothing in the Exynos4412 manual
to suggest that -1UL should be set in the TCMP register for 100% duty.

If I remove that --tcmp line, so that 100% duty cycle is handled as
tcmp=0, the problem is solved: the LED turns on at max brightness when
the leds subsystem requests so.

Any ideas? Is this -1UL thing a quirk from older chip versions not
applicable to Exynos4?

Thanks
Daniel

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

end of thread, other threads:[~2014-10-02 20:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 23:42 pwm-samsung: incorrect register values for 100% duty cycle Daniel Drake
2014-10-01 10:55 ` Tomasz Figa
2014-10-02 19:27   ` Daniel Drake
2014-10-02 19:49     ` Tomasz Figa
2014-10-02 20:20       ` Daniel Drake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.