Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48a364b7 authored by Thierry Reding's avatar Thierry Reding Committed by Samuel Ortiz
Browse files

pwm: Move TWL6030 PWM driver to PWM framework



This commit moves the driver to drivers/pwm and converts it to the new
PWM framework. In order for this to work properly, register the PWM as
child of the multi-function TWL6030 device.

Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent f78959cf
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -298,16 +298,6 @@ config MFD_TWL4030_AUDIO
	select MFD_CORE
	default n

config TWL6030_PWM
	tristate "TWL6030 PWM (Pulse Width Modulator) Support"
	depends on TWL4030_CORE
	select HAVE_PWM
	depends on !PWM
	default n
	help
	  Say yes here if you want support for TWL6030 PWM.
	  This is used to control charging LED brightness.

config TWL6040_CORE
	bool "Support for TWL6040 audio codec"
	depends on I2C=y && GENERIC_HARDIRQS
+0 −1
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o
obj-$(CONFIG_TWL4030_MADC)      += twl4030-madc.o
obj-$(CONFIG_TWL4030_POWER)    += twl4030-power.o
obj-$(CONFIG_MFD_TWL4030_AUDIO)	+= twl4030-audio.o
obj-$(CONFIG_TWL6030_PWM)	+= twl6030-pwm.o
obj-$(CONFIG_TWL6040_CORE)	+= twl6040-core.o twl6040-irq.o

obj-$(CONFIG_MFD_MC13XXX)	+= mc13xxx-core.o
+7 −0
Original line number Diff line number Diff line
@@ -670,6 +670,13 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
			return PTR_ERR(child);
	}

	if (IS_ENABLED(CONFIG_PWM_TWL6030) && twl_class_is_6030()) {
		child = add_child(TWL6030_MODULE_ID1, "twl6030-pwm", NULL, 0,
				  false, 0, 0);
		if (IS_ERR(child))
			return PTR_ERR(child);
	}

	if (IS_ENABLED(CONFIG_TWL4030_USB) && pdata->usb &&
	    twl_class_is_4030()) {

+9 −0
Original line number Diff line number Diff line
@@ -96,6 +96,15 @@ config PWM_TIEHRPWM
	  To compile this driver as a module, choose M here: the module
	  will be called pwm-tiehrpwm.

config PWM_TWL6030
	tristate "TWL6030 PWM support"
	depends on TWL4030_CORE
	help
	  Generic PWM framework driver for TWL6030.

	  To compile this driver as a module, choose M here: the module
	  will be called pwm-twl6030.

config PWM_VT8500
	tristate "vt8500 pwm support"
	depends on ARCH_VT8500
+1 −0
Original line number Diff line number Diff line
@@ -8,4 +8,5 @@ obj-$(CONFIG_PWM_SAMSUNG) += pwm-samsung.o
obj-$(CONFIG_PWM_TEGRA)		+= pwm-tegra.o
obj-$(CONFIG_PWM_TIECAP)	+= pwm-tiecap.o
obj-$(CONFIG_PWM_TIEHRPWM)	+= pwm-tiehrpwm.o
obj-$(CONFIG_PWM_TWL6030)	+= pwm-twl6030.o
obj-$(CONFIG_PWM_VT8500)	+= pwm-vt8500.o
Loading