summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/twl-core.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-09-18 10:29:51 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-19 12:04:25 +0200
commit48a364b758f861b21747a5148f26aedc504edb7f (patch)
treee76941d9155ecd0dc5534ef840a5c0d6ddc107f0 /drivers/mfd/twl-core.c
parentf78959cfa335196ba36d8c4651078f14dc07f2a8 (diff)
downloadlinux-48a364b758f861b21747a5148f26aedc504edb7f.tar.gz
linux-48a364b758f861b21747a5148f26aedc504edb7f.tar.bz2
linux-48a364b758f861b21747a5148f26aedc504edb7f.zip
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: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r--drivers/mfd/twl-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index e208d88d2180..3d700129cf3e 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -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()) {