]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: modules: add PWM GPIO module 20160/head
authorRobert Marko <robert.marko@sartura.hr>
Thu, 25 Sep 2025 09:18:56 +0000 (11:18 +0200)
committerRobert Marko <robimarko@gmail.com>
Thu, 25 Sep 2025 19:53:54 +0000 (21:53 +0200)
Package the generic kernel PWM GPIO driver as module to avoid the need
to build it into the kernel.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://github.com/openwrt/openwrt/pull/20160
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/linux/modules/gpio.mk

index fc6ab66ba80f5b673b3524397aede0ae97d2c3c7..11a92192f61174468cc95f00767f5eb2e6c2664f 100644 (file)
@@ -137,3 +137,20 @@ define KernelPackage/gpio-pcf857x/description
 endef
 
 $(eval $(call KernelPackage,gpio-pcf857x))
+
+
+define KernelPackage/gpio-pwm
+  SUBMENU:=$(GPIO_MENU)
+  DEPENDS:=@GPIO_SUPPORT @PWM_SUPPORT
+  TITLE:=PWM GPIO support
+  KCONFIG:=CONFIG_PWM_GPIO
+  FILES:=$(LINUX_DIR)/drivers/pwm/pwm-gpio.ko
+  AUTOLOAD:=$(call AutoProbe,pwm-gpio)
+endef
+
+define KernelPackage/gpio-pwm/description
+ Generic PWM framework driver for software PWM toggling a GPIO pin from
+ kernel high-resolution timers.
+endef
+
+$(eval $(call KernelPackage,gpio-pwm))