Skip to content

pwm: meson: Support constant and polarity bits

George Stark linux-amlogic linux-arm-kernel linux-pwm lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v24 patches 6 repliesSuperseded
  3. v13 patches 4 repliesSuperseded

Changes in v3 from the cover letter

pwm: meson: Simplify get_state() callback
- drop local variable channel
pwm: meson: Support constant and polarity bits
- drop meson_pwm_assign_bit() and implement bit assignment in-place
link to v2: [2]

[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/
[2] https://lore.kernel.org/linux-arm-kernel/l5xvdndysdvtil472it6ylthcfam5jp7lh3son45mezq7dh2yk@3yj557k2o5k5/T/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4pwm: meson: Simplify get_state() callbackdrivers/pwm/pwm-meson.c+5 -60 replies
2/4pwm: meson: Support constant and polarity bitsdrivers/pwm/pwm-meson.c+54 -70 replies
3/4pwm: meson: Use separate device id data for axg and g12drivers/pwm/pwm-meson.c+18 -10 replies
4/4pwm: meson: Enable constant and polarity features for g12, axg, s4drivers/pwm/pwm-meson.c+14 -00 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchNeil Armstrong
1/4
2/4
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] pwm: meson: Support constant and polarity bits

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 <[email protected]>
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 <[email protected]>
link to v1: [1]

Changes in v3:
pwm: meson: Simplify get_state() callback
- drop local variable channel
pwm: meson: Support constant and polarity bits
- drop meson_pwm_assign_bit() and implement bit assignment in-place
link to v2: [2]

[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/
[2] https://lore.kernel.org/linux-arm-kernel/l5xvdndysdvtil472it6ylthcfam5jp7lh3son45mezq7dh2yk@3yj557k2o5k5/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 | 105 ++++++++++++++++++++++++++++++++++------
 1 file changed, 91 insertions(+), 14 deletions(-)

--
2.25.1