u-boot/drivers/misc
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
..
imx8 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ali512x.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
altera_sysid.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
atsha204a-i2c.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
cbmem_console.c x86: Make coreboot sysinfo available to any x86 board 2021-03-27 13:59:37 +13:00
cros_ec.c pwm: Add a driver for Chrome OS EC PWM 2021-04-10 16:08:39 +02:00
cros_ec_i2c.c dm: treewide: Rename 'platdata' variables to just 'plat' 2020-12-13 16:51:08 -07:00
cros_ec_lpc.c cros_ec: Add support for switches 2021-01-30 14:25:41 -07:00
cros_ec_sandbox.c sandbox: cros_ec: Only write EC state when the EC is probed 2021-03-27 15:04:31 +13:00
cros_ec_spi.c cros_ec: Fix up driver names to avoid dtoc warnings 2020-11-05 14:58:45 +08:00
ds4510.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ds4510.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
esm_pmic.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fs_loader.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
fsl_devdis.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_ifc.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
fsl_iim.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
fsl_portals.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fsl_sec_mon.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
gdsys_ioep.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
gdsys_ioep.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
gdsys_rxaui_ctrl.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
gdsys_soc.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
gdsys_soc.h misc: Add gdsys_soc driver 2018-11-14 09:16:27 -08:00
gpio_led.c status_led: Kconfig migration 2017-01-21 15:12:33 -05:00
i2c_eeprom.c dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET() 2021-01-05 12:26:35 -07:00
i2c_eeprom_emul.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
ihs_fpga.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
ihs_fpga.h misc: Add IHS FPGA driver 2018-11-14 09:16:27 -08:00
irq-uclass.c dm: Rename device_get_by_driver_info_idx() 2021-03-26 17:03:08 +13:00
irq_sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
jz4780_efuse.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
k3_avs.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
k3_esm.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig test: Move some test drivers into their own file 2021-01-05 12:24:40 -07:00
Makefile dm: i2c: allow disabling driver model in SPL 2021-02-21 06:07:30 +01:00
mc9sdz60.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
microchip_flexcom.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
misc-uclass.c misc: Allow child devices 2019-02-09 12:50:22 -07:00
misc_sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
mpc83xx_serdes.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
mpc83xx_serdes.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mxc_ocotp.c misc: ocotp: Update OCOTP driver for iMX8MQ B2 2021-04-08 09:18:29 +02:00
mxs_ocotp.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
nuvoton_nct6102d.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p2sb-uclass.c x86: apl: Drop support for !OF_PLATDATA_PARENT 2021-01-05 12:24:40 -07:00
p2sb_emul.c x86: p2sb: Drop LOG_DEBUG 2021-03-27 13:59:36 +13:00
p2sb_sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pca9551_led.c common: Drop global inclusion of status_led.h 2019-12-02 18:23:06 -05:00
pwrseq-uclass.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
qfw.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rockchip-efuse.c dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET() 2021-01-05 12:26:35 -07:00
rockchip-otp.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
sandbox_adder.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
sifive-otp.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
smsc_lpc47m.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
smsc_sio1007.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spltest_sandbox.c sandbox: Add a compatible string for spltest 2021-01-05 12:24:41 -07:00
status_led.c status_led: Tidy up the code style 2019-12-02 18:23:06 -05:00
stm32_rcc.c misc: rcc: keep the rcc device name for subnode 2021-01-13 09:52:58 +01:00
stm32mp_fuse.c dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET() 2021-01-05 12:26:35 -07:00
swap_case.c dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
syscon_sandbox.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tegra186_bpmp.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
tegra_car.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
test_drv.c dtoc: Generate device instances 2021-03-22 19:23:27 +13:00
twl4030_led.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
vexpress_config.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
winbond_w83627.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00