u-boot/drivers/pwm
Alper Nebi Yasak 1b9ee2882e pwm: Add a driver for Chrome OS EC PWM
This PWM is used in rk3399-gru-bob and rk3399-gru-kevin to control
the display brightness. We can only change the duty cycle, so on
set_config() we just try to match the duty cycle that dividing duty_ns
by period_ns gives us. To disable, we set the duty cycle to zero while
keeping the old value for when we want to re-enable it.

The cros_ec_set_pwm_duty() function is taken from Depthcharge's
cros_ec_set_bl_pwm_duty() but modified to use the generic pwm type.
The driver itself is very loosely based on rk_pwm.c for the general pwm
driver structure.

The devicetree binding file is from Linux, before it was converted to
YAML at 5df5a577a6b4 ("dt-bindings: pwm: Convert google,cros-ec-pwm.txt
to YAML format") in their repo.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-04-10 16:08:39 +02:00
..
cros_ec_pwm.c pwm: Add a driver for Chrome OS EC PWM 2021-04-10 16:08:39 +02:00
exynos_pwm.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
Kconfig pwm: Add a driver for Chrome OS EC PWM 2021-04-10 16:08:39 +02:00
Makefile pwm: Add a driver for Chrome OS EC PWM 2021-04-10 16:08:39 +02:00
pwm-imx-util.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pwm-imx-util.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pwm-imx.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pwm-meson.c dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
pwm-mtk.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pwm-sifive.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pwm-ti-ehrpwm.c dm: fix build errors generated by last merges 2021-01-15 13:12:38 -05:00
pwm-uclass.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rk_pwm.c rockchip: pwm: Fix default polarity 2021-04-10 11:54:59 +02:00
sandbox_pwm.c video: backlight: Support PWMs without a known period_ns 2021-04-10 16:07:12 +02:00
sunxi_pwm.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
tegra_pwm.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00