mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-27 15:12:21 +00:00
1b9ee2882e
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>
23 lines
718 B
Makefile
23 lines
718 B
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2006
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
#
|
|
# (C) Copyright 2001
|
|
# Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
|
|
|
|
#ccflags-y += -DDEBUG
|
|
|
|
obj-$(CONFIG_DM_PWM) += pwm-uclass.o
|
|
|
|
obj-$(CONFIG_PWM_CROS_EC) += cros_ec_pwm.o
|
|
obj-$(CONFIG_PWM_EXYNOS) += exynos_pwm.o
|
|
obj-$(CONFIG_PWM_IMX) += pwm-imx.o pwm-imx-util.o
|
|
obj-$(CONFIG_PWM_MESON) += pwm-meson.o
|
|
obj-$(CONFIG_PWM_MTK) += pwm-mtk.o
|
|
obj-$(CONFIG_PWM_ROCKCHIP) += rk_pwm.o
|
|
obj-$(CONFIG_PWM_SANDBOX) += sandbox_pwm.o
|
|
obj-$(CONFIG_PWM_SIFIVE) += pwm-sifive.o
|
|
obj-$(CONFIG_PWM_TEGRA) += tegra_pwm.o
|
|
obj-$(CONFIG_PWM_SUNXI) += sunxi_pwm.o
|
|
obj-$(CONFIG_PWM_TI_EHRPWM) += pwm-ti-ehrpwm.o
|