linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] pwm: meson: Support constant and polarity bits
@ 2024-10-16 15:25 George Stark
  2024-10-16 15:25 ` [PATCH v2 1/4] pwm: meson: Simplify get_state() callback George Stark
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: George Stark @ 2024-10-16 15:25 UTC (permalink / raw)
  To: u.kleine-koenig, neil.armstrong, khilman, jbrunet,
	martin.blumenstingl
  Cc: linux-pwm, linux-amlogic, linux-arm-kernel, linux-kernel, kernel,
	George Stark

This patch series add support for amlogic's newer PWM IPs hardware features:
constant and polarity bits.

Using polarity bit for inverting output signal allows to identify inversion
in .get_state() callback which can only rely on data read from registers.

Using constant bit allows to have steady output level when duty cycle is zero or
equal to period. Without this bit there will always be single-clock spikes on output.

Those bits are supported in axg, g12 and newer SoC families like s4, a1 etc.
Tested on g12, a1.

Changes in v2:
  pwm: meson: Support constant and polarity bits
    - drop separate set_constant() and set_polarity() and move register writings
      into enable() and disable()
  pwm: meson: Simplify get_state() callback
    - add new patch to make .get_state() callback consistent. Since I add new
      fields to struct meson_pwm_channel either we should fill back all of them
      from registers or not at all.
  pwm: meson: Use separate device id data for axg and g12
    - add splitting amlogic,meson8-pwm-v2 into amlogic,meson-axg-pwm-v2 and
      amlogic,meson-g12-pwm-v2 with pwm_meson_axg_v2_data for both compatibles.
    - update commit message
    - add tag: Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
  pwm: meson: Enable constant and polarity features for g12, axg, s4
    - add enabling const and polarity to pwm_meson_axg_v2_data
    - add tag: Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
  link to v1: [1]

[1] https://lore.kernel.org/linux-arm-kernel/20241007193203.1753326-4-gnstark@salutedevices.com/T/

George Stark (4):
  pwm: meson: Simplify get_state() callback
  pwm: meson: Support constant and polarity bits
  pwm: meson: Use separate device id data for axg and g12
  pwm: meson: Enable constant and polarity features for g12, axg, s4

 drivers/pwm/pwm-meson.c | 103 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 92 insertions(+), 11 deletions(-)

--
2.25.1



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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 15:25 [PATCH v2 0/4] pwm: meson: Support constant and polarity bits George Stark
2024-10-16 15:25 ` [PATCH v2 1/4] pwm: meson: Simplify get_state() callback George Stark
2024-10-20 10:44   ` kernel test robot
2024-11-04  9:08   ` Uwe Kleine-König
2024-10-16 15:25 ` [PATCH v2 2/4] pwm: meson: Support constant and polarity bits George Stark
2024-11-04  9:32   ` Uwe Kleine-König
2024-11-06 13:54     ` George Stark
2024-11-07  8:41       ` Uwe Kleine-König
2024-11-19 12:51         ` George Stark
2024-11-19 15:19           ` Uwe Kleine-König
2024-10-16 15:25 ` [PATCH v2 3/4] pwm: meson: Use separate device id data for axg and g12 George Stark
2024-10-16 15:25 ` [PATCH v2 4/4] pwm: meson: Enable constant and polarity features for g12, axg, s4 George Stark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).