Re: [PATCH 2/2] iio: imu: mpu6050: Add support for vdd-supply regulator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux