lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-11-07 19:15    [W:0.050 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site