On Fri, Jun 26, 2020 at 06:32:20PM +0900, Yoshihiro Shimoda wrote: > +static int reg_is_enabled(struct regulator_dev *rdev) > +{ > + struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); > + > + return !priv->disabled_in_suspend; > +} This is broken, the state of the regualtor during system runtime need have no connection with the state of the regulator during system suspend. > +static int reg_prepare_disable(struct regulator_dev *rdev) > +{ > + struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); > + > + priv->disabled_in_suspend = true; > + > + return 0; > +} According to the changelog this is all about reflecting changes in the system state done by firmware but there's no interaction with firmware here which means this will be at best fragile. If we need to reflect changes in firmware configuration I'd expect there to be some interaction with firmware about how it is configured, or at least that the configuration would come from the same source.
Attachment:
signature.asc
Description: PGP signature