All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/2] Clock based PWM output driver
@ 2022-02-20 11:50 Nikita Travkin
  2022-02-20 11:50 ` [PATCH v6 1/2] dt-bindings: pwm: Document clk based PWM controller Nikita Travkin
  2022-02-20 11:50 ` [PATCH v6 2/2] pwm: Add clock based PWM output driver Nikita Travkin
  0 siblings, 2 replies; 6+ messages in thread
From: Nikita Travkin @ 2022-02-20 11:50 UTC (permalink / raw)
  To: thierry.reding, lee.jones
  Cc: u.kleine-koenig, robh+dt, sboyd, krzk, linus.walleij, masneyb,
	sean.anderson, linux-pwm, devicetree, linux-kernel,
	~postmarketos/upstreaming, Nikita Travkin

This series introduces an "adapter" driver that allows PWM consumers
to control clock outputs with duty-cycle control.

Some platforms (e.g. some Qualcomm chipsets) have "General Purpose"
clocks that can be muxed to GPIO outputs and used as PWM outputs.
Those outputs may be connected to various peripherals such as
leds in display backlight or haptic feedback motor driver.

To avoid re-implementing every single PWM consumer driver with clk
support (like in [1]) and don't put the burden of providing the PWM
sources on the clock drivers (as was proposed in [2]), clk based
pwm controller driver is introduced.

There is an existing driver that provides the opposite function
in drivers/clk/clk-pwm.c with a compatible "pwm-clock" so the new
driver uses the opposite naming scheme: drivers/pwm/pwm-clk.c
and compatible "clk-pwm".

Changes in v2:
 - Fix filename in the DT schema.
 - Address Uwe's review comments.
Changes in v3:
 - Fix node pattern in the core pwm schema.
 - Address Uwe's review comments.
Changes in v4:
 - Drop the (incorrect) pwm schema change.
 - Use generic node name in the dt bindings example.
Changes in v5:
 - Correct required properties.
 - add missed returns.
Changes in v6:
 - Add missed error cleanup
 - Adjust limitations comment

Nikita Travkin (2):
  dt-bindings: pwm: Document clk based PWM controller
  pwm: Add clock based PWM output driver

 .../devicetree/bindings/pwm/clk-pwm.yaml      |  46 ++++++
 drivers/pwm/Kconfig                           |  10 ++
 drivers/pwm/Makefile                          |   1 +
 drivers/pwm/pwm-clk.c                         | 139 ++++++++++++++++++
 4 files changed, 196 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/clk-pwm.yaml
 create mode 100644 drivers/pwm/pwm-clk.c

-- 
2.34.1


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

end of thread, other threads:[~2022-04-02  7:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-20 11:50 [PATCH v6 0/2] Clock based PWM output driver Nikita Travkin
2022-02-20 11:50 ` [PATCH v6 1/2] dt-bindings: pwm: Document clk based PWM controller Nikita Travkin
2022-02-23 15:56   ` Rob Herring
2022-02-20 11:50 ` [PATCH v6 2/2] pwm: Add clock based PWM output driver Nikita Travkin
2022-03-28 10:56   ` Uwe Kleine-König
2022-04-02  6:59     ` Nikita Travkin

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.