From 4b8b81e7e33b8edb0f2d24a2ce98e39abe10b0fe Mon Sep 17 00:00:00 2001 From: William Qiu Date: Fri, 22 Dec 2023 17:45:46 +0800 Subject: pwm: opencores: Add PWM driver support Add driver for OpenCores PWM Controller. And add compatibility code which based on StarFive SoC. Co-developed-by: Hal Feng Signed-off-by: Hal Feng Signed-off-by: William Qiu Link: https://lore.kernel.org/r/20231222094548.54103-3-william.qiu@starfivetech.com [esmil: delete chip->of_pwm_n_cells = 3 assignment, use devm_pwmchip_alloc()] Signed-off-by: Emil Renner Berthing --- drivers/pwm/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/pwm/Kconfig') diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index 1dd7921194f5..b1c08cf66b56 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -440,6 +440,18 @@ config PWM_NTXEC controller found in certain e-book readers designed by the original design manufacturer Netronix. +config PWM_OCORES + tristate "OpenCores PWM support" + depends on HAS_IOMEM && OF + depends on COMMON_CLK + depends on ARCH_STARFIVE || COMPILE_TEST + help + If you say yes to this option, support will be included for the + OpenCores PWM. For details see https://opencores.org/projects/ptc. + + To compile this driver as a module, choose M here: the module + will be called pwm-ocores. + config PWM_OMAP_DMTIMER tristate "OMAP Dual-Mode Timer PWM support" depends on OF -- cgit v1.2.3