diff mbox

[OpenWrt-Devel,v2,1/5] kernel: other: add PWM controller support

Message ID 1447955614-4773-2-git-send-email-tharvey@gateworks.com
State Deferred
Headers show

Commit Message

Tim Harvey Nov. 19, 2015, 5:53 p.m. UTC
This adds basic PWM controller support and support for i.MX

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
v2:
- add TARGET_imx6 dep for pwm-imx

 package/kernel/linux/modules/other.mk | 36 +++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

John Crispin Nov. 22, 2015, 8:55 a.m. UTC | #1
Hi Tim,



On 19/11/2015 18:53, Tim Harvey wrote:
> This adds basic PWM controller support and support for i.MX
> 
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
> v2:
> - add TARGET_imx6 dep for pwm-imx
> 
>  package/kernel/linux/modules/other.mk | 36 +++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
> index 55fb6f1..6493b91 100644
> --- a/package/kernel/linux/modules/other.mk
> +++ b/package/kernel/linux/modules/other.mk

is there a specific reason not to create a new file for PWM ?

	John

> @@ -359,6 +359,42 @@ endef
>  $(eval $(call KernelPackage,mmc))
>  
>  
> +define KernelPackage/pwm
> +  SUBMENU:=$(OTHER_MENU)
> +  TITLE:=Pulse-Width Modulation support
> +  KCONFIG:= \
> +	CONFIG_PWM=y \
> +	CONFIG_REGULATOR_PWM=n \
> +	CONFIG_PWM_FSL_FTM=n
> +endef
> +
> +define KernelPackage/pwm/description
> + Pulse Width Modulation subsystem.
> +endef
> +
> +$(eval $(call KernelPackage,pwm))
> +
> +define AddDepends/pwm
> +  SUBMENU:=$(OTHER_MENU)
> +  DEPENDS+=kmod-pwm $(1)
> +endef
> +
> +define KernelPackage/pwm-imx
> +  SUBMENU:=$(OTHER_MENU)
> +  TITLE:=IMX Pulse-Width Modulation support
> +  KCONFIG:=CONFIG_PWM_IMX
> +  FILES:= $(LINUX_DIR)/drivers/pwm/pwm-imx.ko
> +  DEPENDS:=@TARGET_imx6
> +  AUTOLOAD:=$(call AutoProbe,pwm-imx)
> +  $(call AddDepends/pwm)
> +endef
> +
> +define KernelPackage/pwm-imx/description
> + Freescale IMX Pulse Width Modulation support.
> +endef
> +
> +$(eval $(call KernelPackage,pwm-imx))
> +
>  define KernelPackage/sdhci
>    SUBMENU:=$(OTHER_MENU)
>    TITLE:=Secure Digital Host Controller Interface support
>
Tim Harvey Nov. 23, 2015, 4:41 p.m. UTC | #2
On Sun, Nov 22, 2015 at 12:55 AM, John Crispin <blogic@openwrt.org> wrote:
> Hi Tim,
>
>
>
> On 19/11/2015 18:53, Tim Harvey wrote:
>> This adds basic PWM controller support and support for i.MX
>>
>> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>> ---
>> v2:
>> - add TARGET_imx6 dep for pwm-imx
>>
>>  package/kernel/linux/modules/other.mk | 36 +++++++++++++++++++++++++++++++++++
>>  1 file changed, 36 insertions(+)
>>
>> diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
>> index 55fb6f1..6493b91 100644
>> --- a/package/kernel/linux/modules/other.mk
>> +++ b/package/kernel/linux/modules/other.mk
>
> is there a specific reason not to create a new file for PWM ?

John,

No reason - I wasn't sure what was expected. I did create a new file
for backlight but also noticed other things in other.mk that could be
split out in a cleanup.

Tim
John Crispin Nov. 24, 2015, 6:27 p.m. UTC | #3
On 23/11/2015 17:41, Tim Harvey wrote:
> On Sun, Nov 22, 2015 at 12:55 AM, John Crispin <blogic@openwrt.org> wrote:
>> Hi Tim,
>>
>>
>>
>> On 19/11/2015 18:53, Tim Harvey wrote:
>>> This adds basic PWM controller support and support for i.MX
>>>
>>> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>>> ---
>>> v2:
>>> - add TARGET_imx6 dep for pwm-imx
>>>
>>>  package/kernel/linux/modules/other.mk | 36 +++++++++++++++++++++++++++++++++++
>>>  1 file changed, 36 insertions(+)
>>>
>>> diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
>>> index 55fb6f1..6493b91 100644
>>> --- a/package/kernel/linux/modules/other.mk
>>> +++ b/package/kernel/linux/modules/other.mk
>>
>> is there a specific reason not to create a new file for PWM ?
> 
> John,
> 
> No reason - I wasn't sure what was expected. I did create a new file
> for backlight but also noticed other things in other.mk that could be
> split out in a cleanup.
> 
> Tim

Hi Tim,

just had another look and am wondering if it even makes sense to package
these modules. the ventanas have so much space and the modules are
really small. might make more sense to just add this to the kernel config ?

	John
diff mbox

Patch

diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index 55fb6f1..6493b91 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -359,6 +359,42 @@  endef
 $(eval $(call KernelPackage,mmc))
 
 
+define KernelPackage/pwm
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Pulse-Width Modulation support
+  KCONFIG:= \
+	CONFIG_PWM=y \
+	CONFIG_REGULATOR_PWM=n \
+	CONFIG_PWM_FSL_FTM=n
+endef
+
+define KernelPackage/pwm/description
+ Pulse Width Modulation subsystem.
+endef
+
+$(eval $(call KernelPackage,pwm))
+
+define AddDepends/pwm
+  SUBMENU:=$(OTHER_MENU)
+  DEPENDS+=kmod-pwm $(1)
+endef
+
+define KernelPackage/pwm-imx
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=IMX Pulse-Width Modulation support
+  KCONFIG:=CONFIG_PWM_IMX
+  FILES:= $(LINUX_DIR)/drivers/pwm/pwm-imx.ko
+  DEPENDS:=@TARGET_imx6
+  AUTOLOAD:=$(call AutoProbe,pwm-imx)
+  $(call AddDepends/pwm)
+endef
+
+define KernelPackage/pwm-imx/description
+ Freescale IMX Pulse Width Modulation support.
+endef
+
+$(eval $(call KernelPackage,pwm-imx))
+
 define KernelPackage/sdhci
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Secure Digital Host Controller Interface support