diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-11-13 09:28:43 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-21 16:07:59 +0100 |
commit | afc45898f62c7b139fca3cf0b72fb8ec476fee3f (patch) | |
tree | 146c18a4e875d2ecf1aa954a4a5f9bd9b553e448 /drivers/mfd/twl-core.c | |
parent | 24ae36f5c285d14f449dd19821aca1097a2a2313 (diff) | |
download | blackbird-op-linux-afc45898f62c7b139fca3cf0b72fb8ec476fee3f.tar.gz blackbird-op-linux-afc45898f62c7b139fca3cf0b72fb8ec476fee3f.zip |
mfd: twl-core: Support for proper PWM drivers
The twl6030-pwm driver is going to be deleted since it was only able to
control the Charging indicator LED on the twl6030 PMIC.
The new set of drivers are going to provide support for both PWMs and PWM
driven LED outputs on TWL4030 and TWL6030 PMICs.
The twl-pwm driver will handle the PWMs (2 instance) while the twl-pwmled
driver is to control the two LED instance on TWL4030 and to charging
indicator LED (1 instance) on TWL6030.
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-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.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 262466837689..1dfd58344425 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -671,8 +671,15 @@ 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, + if (IS_ENABLED(CONFIG_PWM_TWL)) { + child = add_child(SUB_CHIP_ID1, "twl-pwm", NULL, 0, + false, 0, 0); + if (IS_ERR(child)) + return PTR_ERR(child); + } + + if (IS_ENABLED(CONFIG_PWM_TWL_LED)) { + child = add_child(SUB_CHIP_ID1, "twl-pwmled", NULL, 0, false, 0, 0); if (IS_ERR(child)) return PTR_ERR(child); |