Hi,

On Tue, Aug 4, 2020 at 12:08 AM Stephen Boyd <swb...@chromium.org> wrote:
>
> I see it takes about 5us per regulator to grab the lock, check that this
> regulator isn't going to do anything for suspend, and then release the
> lock. When that is combined with PMICs that have dozens of regulators we
> get into a state where we spend a few miliseconds doing a bunch of
> locking operations synchronously to figure out that there's nothing to
> do. Let's reorganize the code here a bit so that we don't grab the lock
> until we're actually going to do something so that suspend is a little
> faster.
>
> Cc: Matthias Kaehlcke <m...@chromium.org>
> Cc: Douglas Anderson <diand...@chromium.org>
> Signed-off-by: Stephen Boyd <swb...@chromium.org>
> ---
>  drivers/regulator/core.c | 75 +++++++++++++++++++++++++++-------------
>  1 file changed, 51 insertions(+), 24 deletions(-)

Looks good to me.  Agree that getting a pointer to the relevant
"struct regulator_state" and checking whether some details about it
and our ops should be safe to do without a lock.  Patch looks clean
and correct.

Reviewed-by: Douglas Anderson <diand...@chromium.org>

Reply via email to