Skip to content
Commit 7f61257c authored by Vincent Whitchurch's avatar Vincent Whitchurch Committed by Uwe Kleine-König
Browse files

pwm: Add GPIO PWM driver



Add a software PWM which toggles a GPIO from a high-resolution timer.

This will naturally not be as accurate or as efficient as a hardware
PWM, but it is useful in some cases.  I have for example used it for
evaluating LED brightness handling (via leds-pwm) on a board where the
LED was just hooked up to a GPIO, and for a simple verification of the
timer frequency on another platform.

Since high-resolution timers are used, sleeping GPIO chips are not
supported and are rejected in the probe function.

Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
Co-developed-by: default avatarStefan Wahren <wahrenst@gmx.net>
Signed-off-by: default avatarStefan Wahren <wahrenst@gmx.net>
Co-developed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarDhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20240604-pwm-gpio-v7-2-6b67cf60db92@linaro.org


Signed-off-by: default avatarUwe Kleine-König <ukleinek@kernel.org>
parent 1577ddaa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment