On Thu, Mar 27, 2014 at 10:29:20PM +0100, Carlo Caione wrote: > +static int axp20x_set_suspend_voltage(struct regulator_dev *rdev, int uV) > +{ > + int sel = regulator_map_voltage_iterate(rdev, uV, uV); > + > + if (sel < 0) > + return sel; > + > + return regulator_set_voltage_sel_regmap(rdev, sel); > +} This is fairly obviously broken - it's overwriting the normal runtime value, this will disrupt the running system if we want the value we use on suspend is different to the value we want at runtime. Think about it - if this was a sane thing to do the core would just do it without needing driver specific code, we already know how to set the voltage for the device.
Attachment:
signature.asc
Description: Digital signature