On Fri, May 20, 2022 at 02:50:17PM +0300, Dmitry Baryshkov wrote: > On Fri, 20 May 2022 at 13:10, Johan Hovold <johan+linaro@xxxxxxxxxx> wrote: > > > > Add a helper for updating the SW_COLLAPSE bit during initialisation and > > state updates. > > > > > > Note that the update during initialisation was relying on the > > SW_COLLAPSE bit not having been set earlier rather than passing in zero > > explicitly to clear the collapse vote. > > I think this part deserves a separate commit with proper Fixes: tag. No, it's not a bug. The value passed in is explicitly set a bit higher up in the same function so that the SW_COLLAPSE bit is (currently) never set. It mostly just looks weird and probably wasn't intentional. > > @@ -425,8 +437,7 @@ static int gdsc_init(struct gdsc *sc) > > * If a Votable GDSC is ON, make sure we have a Vote. > > */ > > if (sc->flags & VOTABLE) { > > - ret = regmap_update_bits(sc->regmap, sc->gdscr, > > - SW_COLLAPSE_MASK, val); > > + ret = gdsc_update_collapse_bit(sc, false); > > if (ret) > > return ret; > > } Johan