Re: [PATCH 2/2] pwm: Move TWL6030 PWM driver to PWM framework

From: Thierry Reding
Date: Fri Sep 07 2012 - 09:17:45 EST


On Mon, Sep 03, 2012 at 11:15:27AM +0300, Peter Ujfalusi wrote:
> On 09/02/2012 01:40 PM, Thierry Reding wrote:
> > diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
> > index 5fbb2a6..1b1a789 100644
> > --- a/drivers/mfd/twl-core.c
> > +++ b/drivers/mfd/twl-core.c
> > @@ -638,6 +638,13 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
> > return PTR_ERR(child);
> > }
> >
> > + if (IS_ENABLED(CONFIG_PWM_TWL6030)) {
>
> I think you should also check for the PMIC versions here before adding the child:
> if (IS_ENABLED(CONFIG_PWM_TWL6030) && twl_class_is_6030()) {
>
> To avoid loading the twl6030-pwm driver for twl4030 class.

Yes, that does make sense. I'll add it.

Thierry

Attachment: pgp00000.pgp
Description: PGP signature