Messages in this thread | | | Date | Thu, 7 Nov 2019 19:12:00 +0100 | From | Stephan Gerhold <> | Subject | Re: [PATCH 2/2] iio: imu: mpu6050: Add support for vdd-supply regulator |
| |
On Thu, Nov 07, 2019 at 01:29:33PM +0000, Jean-Baptiste Maneyrol wrote: > Hi Stephan, > > I think the regulator_bulk usage is good, and the core_enable/disable_regulator functions implemented the way you did is perfect for the init/shutdown phase. > > We just need to change the suspend/resume implementation to use something different.
As far as I can tell, the regulator bulk API is designed to be used when you want to enable/disable multiple regulators at the same time. It does not really allow controlling one of its regulators separately (in a clean way).
E.g. if you would use regulator_bulk_disable() but already disabled one of the regulators at some point earlier, you would run into a warning because the regulator is disabled twice.
My updated patch is still clean enough (in my opinion), so I would say it is better to avoid the regulator bulk API for this situation. I will send v2 shortly.
Thanks, Stephan
| |