Message ID | 1318263578-7407-2-git-send-email-rnayak@ti.com |
---|---|
State | New |
Headers | show |
On Mon, Oct 10, 2011 at 09:49:34PM +0530, Rajendra Nayak wrote: > Remove the hardcoded .valid_modes_mask and .valid_ops_mask for > each regulator from the twl driver and let the boards pass it. > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Please update this changelog - as I said in reply to your previous posting this isn't actually hardcoding anything, it's dropping things from the constraints which the hardware doesn't support.
On Monday 10 October 2011 09:55 PM, Mark Brown wrote: > On Mon, Oct 10, 2011 at 09:49:34PM +0530, Rajendra Nayak wrote: >> Remove the hardcoded .valid_modes_mask and .valid_ops_mask for >> each regulator from the twl driver and let the boards pass it. >> >> Signed-off-by: Rajendra Nayak<rnayak@ti.com> >> Acked-by: Mark Brown<broonie@opensource.wolfsonmicro.com> > > Please update this changelog - as I said in reply to your previous > posting this isn't actually hardcoding anything, it's dropping things > from the constraints which the hardware doesn't support. Looks like I completely missed the "&=" and your comment on the previous posting. Looking at it now, seems to me this patch is just un-necessary and what the driver seems to be doing (preventing users from setting flags which the hardware does not support) seems perfectly fine. I will just go ahead and drop this patch.
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index ee8747f..f696287 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -1027,14 +1027,6 @@ static int __devinit twlreg_probe(struct platform_device *pdev) /* copy the features into regulator data */ info->features = (unsigned long)initdata->driver_data; - /* Constrain board-specific capabilities according to what - * this driver and the chip itself can actually do. - */ - c = &initdata->constraints; - c->valid_modes_mask &= REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY; - c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE - | REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS; switch (pdev->id) { case TWL4030_REG_VIO: case TWL4030_REG_VDD1: