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

From: Stephan Gerhold
Date: Wed Nov 06 2019 - 16:36:29 EST


Hi JB,

On Wed, Nov 06, 2019 at 07:55:20PM +0000, Jean-Baptiste Maneyrol wrote:
> Hello Stephan,
>
> nice patch but I have an important concern.
>
> We are calling the core_enable/disable_regulator functions when going into suspend and resume.
> With your changes, we are going to power down the chip when going into suspend and then power it up again.
> This way we will loose all already set configuration, like FSR, sampling rate, init values, ...
> The chip will not be able to work correctly anymore after a suspend-resume cycle.
>
> You need to change the resume/suspend handlers to only disable/enable the vddio regulator, not the vdd one.

That is a good point, thanks!
I guess we are not able to use the regulator bulk API in this case...

I will send a v2 soon.

Stephan