linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Mark Brown <broonie@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Chunyan Zhang <zhang.chunyan@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] regulator: core: Fix s2idle
Date: Tue, 30 Jan 2018 13:11:16 +0100	[thread overview]
Message-ID: <CAMuHMdWgxyEfooAo1c8yKNrHijhbccV41Q=PEkoGoNbZ7sN5NA@mail.gmail.com> (raw)
In-Reply-To: <20180130120340.GB10525@sirena.org.uk>

Hi Mark,

On Tue, Jan 30, 2018 at 1:03 PM, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Jan 30, 2018 at 11:32:26AM +0100, Geert Uytterhoeven wrote:
>> But I have no idea what impact it has.  So far it doesn't seem to hurt,
>> though.
>
> I suspect that instead what we should be doing is changing the
> set_suspend_state() check to the below - if we don't have any
> constraints or there's otherwise nothing to do just let the suspend
> proceed.
>
> Can you give this a spin and confirm if it fixes things?

Sure. Works, too.

> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 42681c10cbe4..dd4708c58480 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -758,7 +758,7 @@ static int suspend_set_state(struct regulator_dev *rdev,
>
>         rstate = regulator_get_suspend_state(rdev, state);
>         if (rstate == NULL)
> -               return -EINVAL;
> +               return 0;
>
>         /* If we have no suspend mode configration don't set anything;
>          * only warn if the driver implements set_suspend_voltage or

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2018-01-30 12:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 10:32 [PATCH] regulator: core: Fix s2idle Geert Uytterhoeven
2018-01-30 12:03 ` Mark Brown
2018-01-30 12:11   ` Geert Uytterhoeven [this message]
2018-01-30 16:19   ` Applied "regulator: Fix suspend to idle" to the regulator tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdWgxyEfooAo1c8yKNrHijhbccV41Q=PEkoGoNbZ7sN5NA@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=zhang.chunyan@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).