On Wed, May 27, 2020 at 12:40:56AM -0700, Saravana Kannan wrote: > When a regulator is left on by the bootloader or anything else before > the kernel starts (let's call this a "boot on" regulator), we need to > keep it on till all the consumers of the regulator have probed. This is No, we don't. As ever we have no idea if there ever will be consumers - we don't know what drivers the system is going to load, we don't know what the intentions of the OS and system integration are and we have zero idea why the system is in the state it's in. > This commit adds a regulator_sync_state() helper function that takes > care of all the "boot on" regulator clean up for any regulator driver. > All one needs to do is add the following line to the driver struct. None of the issues around this have *anything* to do with individual drivers, all this is doing is forcing us to go through and add this to every single driver which doesn't accomplish anything. Regulator drivers have no role in this, they don't set policy, so there is no reason why they should be aware of any of this. Please go and look at the previous discussions of this topic, this needs to work for other users as well.