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>
This commit is contained in:
Thierry Reding
2012-09-18 10:29:51 +02:00
committed by Samuel Ortiz
parent f78959cfa3
commit 48a364b758
6 changed files with 89 additions and 64 deletions

View File

@@ -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()) {