All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] pwm: sun4i: only wait 2 cycles prior to disabling
@ 2021-05-31  4:46 ` Roman Beranek
  0 siblings, 0 replies; 28+ messages in thread
From: Roman Beranek @ 2021-05-31  4:46 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Thierry Reding, Emil Lenngren, Pascal Roeleven, Lee Jones,
	Maxime Ripard, Chen-Yu Tsai, linux-pwm, linux-arm-kernel,
	linux-sunxi, linux-sunxi

As Emil Lenngren has previously shown [1], actually only 1-2 cycles of
the prescaler-divided clock are necessary to pass before the PWM turns
off, not a full period.

To avoid having the PWM re-enabled from another thread while asleep,
ctrl_lock spinlock was converted to a mutex so that it can be released
only after the clock gate has finally been turned on.

[1] https://linux-sunxi.org/PWM_Controller_Register_Guide

Roman Beranek (6):
  pwm: sun4i: enable clk prior to getting its rate
  pwm: sun4i: disable EN bit prior to the delay
  pwm: sun4i: replace spinlock with a mutex
  pwm: sun4i: simplify calculation of the delay time
  pwm: sun4i: shorten the delay to 2 cycles
  pwm: sun4i: don't delay if the PWM is already off

 drivers/pwm/pwm-sun4i.c | 56 +++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 30 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-06-10 13:48 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  4:46 [PATCH 0/6] pwm: sun4i: only wait 2 cycles prior to disabling Roman Beranek
2021-05-31  4:46 ` Roman Beranek
2021-05-31  4:46 ` [PATCH 1/6] pwm: sun4i: enable clk prior to getting its rate Roman Beranek
2021-05-31  4:46   ` Roman Beranek
2021-06-07  8:00   ` Uwe Kleine-König
2021-06-07  8:00     ` Uwe Kleine-König
2021-05-31  4:46 ` [PATCH 2/6] pwm: sun4i: disable EN bit prior to the delay Roman Beranek
2021-05-31  4:46   ` Roman Beranek
2021-06-07  8:07   ` Uwe Kleine-König
2021-06-07  8:07     ` Uwe Kleine-König
2021-05-31  4:46 ` [PATCH 3/6] pwm: sun4i: replace spinlock with a mutex Roman Beranek
2021-05-31  4:46   ` Roman Beranek
2021-05-31  4:46 ` [PATCH 4/6] pwm: sun4i: simplify calculation of the delay time Roman Beranek
2021-05-31  4:46   ` Roman Beranek
2021-05-31  4:46 ` [PATCH 5/6] pwm: sun4i: shorten the delay to 2 cycles Roman Beranek
2021-05-31  4:46   ` Roman Beranek
2021-05-31  4:46 ` [PATCH 6/6] pwm: sun4i: don't delay if the PWM is already off Roman Beranek
2021-05-31  4:46   ` Roman Beranek
2021-06-10 13:41   ` Pascal Roeleven
2021-06-10 13:41     ` Pascal Roeleven
2021-05-31 19:07 ` [PATCH 0/6] pwm: sun4i: only wait 2 cycles prior to disabling Pascal Roeleven
2021-05-31 19:07   ` Pascal Roeleven
2021-05-31 20:01   ` Emil Lenngren
2021-05-31 20:01     ` Emil Lenngren
2021-05-31 20:20     ` Pascal Roeleven
2021-05-31 20:20       ` Pascal Roeleven
2021-06-08 12:28   ` Pascal Roeleven
2021-06-08 12:28     ` Pascal Roeleven

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.