mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] pwm: axi-pwmgen: always enable FORCE_ALIGN
@ 2024-10-09 21:11 David Lechner
  2024-10-09 21:11 ` [PATCH 1/2] pwm: axi-pwmgen: rename 0x10 register David Lechner
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: David Lechner @ 2024-10-09 21:11 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Michael Hennerich, Nuno Sá,
	Trevor Gamblin, linux-pwm, linux-kernel, David Lechner

When using the axi-pwmgen as a trigger for ADCs, we've found that the
default behavior of the PWMGEN IP block is not ideal. The default
behavior is to wait for the period of all PWM outputs to run out before
applying any new settings. But there isn't a way to block until this
happens (and even if there was, it could take a long time). So the
pwm apply function returns before the new settings are actually applied.

This makes certain use cases impossible. For example, to use the PWM
like a GPIO to create a single pulse on and off to trigger a single ADC
conversion.

The AXI PWMGEN has a FORCE_ALIGN configuration option that changes the
behavior so that any new output settings (period, duty cycle, etc.) are
applied immediately. This can cause glitches in the output, but makes
the PWM actually useable for most applications.

Also, there was a naming conflict with register names, so there is a
preliminary cleanup patch to sort that out.

---
David Lechner (2):
      pwm: axi-pwmgen: rename 0x10 register
      pwm: axi-pwmgen: enable FORCE_ALIGN by default

 drivers/pwm/pwm-axi-pwmgen.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)
---
base-commit: ff25451372ee1aa4c4f4401dc96516782a00dd4d
change-id: 20241009-pwm-axi-pwmgen-enable-force_align-cfb403da4612

Best regards,
-- 
David Lechner <dlechner@baylibre.com>


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

end of thread, other threads:[~2024-10-11 10:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-09 21:11 [PATCH 0/2] pwm: axi-pwmgen: always enable FORCE_ALIGN David Lechner
2024-10-09 21:11 ` [PATCH 1/2] pwm: axi-pwmgen: rename 0x10 register David Lechner
2024-10-09 21:11 ` [PATCH 2/2] pwm: axi-pwmgen: enable FORCE_ALIGN by default David Lechner
2024-10-10  8:33 ` [PATCH 0/2] pwm: axi-pwmgen: always enable FORCE_ALIGN Nuno Sá
2024-10-11  9:51   ` Uwe Kleine-König
2024-10-11 10:14     ` Nuno Sá
2024-10-11  9:53 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®