pwm: export the generic pwm api as module
authorClaudio Mignanti <c.mignanti@gmail.com>
Mon, 19 Jul 2010 21:14:24 +0000 (21:14 +0000)
committerClaudio Mignanti <c.mignanti@gmail.com>
Mon, 19 Jul 2010 21:14:24 +0000 (21:14 +0000)
SVN-Revision: 22297

package/kernel/modules/other.mk
target/linux/generic/files/drivers/pwm/Makefile

index 3781cbe329de00badbb99bc1e8160316141c04b1..b61b529c750c500eb43ef7fa98c76fc5daa4877f 100644 (file)
@@ -679,11 +679,26 @@ endef
 $(eval $(call KernelPackage,wdt-scx200))
 
 
+define KernelPackage/pwm
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=PWM generic API
+  KCONFIG:=CONFIG_GENERIC_PWM
+  FILES:=$(LINUX_DIR)/drivers/pwm/pwm.ko
+  AUTOLOAD:=$(call AutoLoad,50,pwm)
+endef
+
+define KernelPackage/pwm/description
+ Kernel module that implement a generic PWM API
+endef
+
+$(eval $(call KernelPackage,pwm))
+
+
 define KernelPackage/pwm-gpio
   SUBMENU:=$(OTHER_MENU)
   TITLE:=PWM over GPIO
-  KCONFIG:=CONFIG_GENERIC_PWM \
-               CONFIG_GPIO_PWM
+  DEPENDS:=+kmod-pwm
+  KCONFIG:=CONFIG_GPIO_PWM
   FILES:=$(LINUX_DIR)/drivers/pwm/gpio-pwm.ko
   AUTOLOAD:=$(call AutoLoad,51,gpio-pwm)
 endef
index 1c0e98e35784fdd8d54345cd3407bc7d967a17f7..af22041bf2b26ee1f0efeec1a4dec5e302ac7b0f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Makefile for pwm devices
 #
-obj-y := pwm.o
+obj-$(CONFIG_GENERIC_PWM) := pwm.o
 obj-$(CONFIG_ATMEL_PWM)                += atmel-pwm.o
 obj-$(CONFIG_GPIO_PWM)         += gpio-pwm.o