mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: Zhi Li <lznuaa@gmail.com>, Linus Walleij <linus.walleij@linaro.org>
Cc: "Shawn Guo" <shawn.guo@freescale.com>,
	"Sascha Hauer" <kernel@pengutronix.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"kernel list" <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC] pinctrl: pinctrl-imx: implement suspend/resume
Date: Thu, 04 Jun 2015 22:24:57 +0200	[thread overview]
Message-ID: <9333041871b27a3099b185e26b564e2a@agner.ch> (raw)
In-Reply-To: <CAHrpEqS8qYUrcSoNSDMB9tA+D_KcfoSWz75VDSk-S=ZNpwU7mg@mail.gmail.com>

On 2015-06-04 17:00, Zhi Li wrote:
> On Mon, Jun 1, 2015 at 10:12 AM, Stefan Agner <stefan@agner.ch> wrote:
<snip>
>> If no other SoC is making use of it, its probably better to implement
>> it in the SoC specific code (e.g. pinctrl-vf610.c?) Although, currently
>> the mapped access to the registers is only locally available in
>> pinctrl-imx.c.
> 
> i.MX7 support LPSR mode, which IOMUX will lost state also.
> 

Thanks for the information, good to know.

>>
>> I'm also not sure if the suspend/resume functions are currently
>> early enough, at least the noirq family of suspend/resume functions
>> would be earlier. Hence if a device needs to have access to pins then,
>> we would restore them too late. Maybe syscore_ops would be more
>> appropriate?
> 
> Driver can call pinctrl_pm_select_sleep_state in suspend and
> pinctrl_pm_select_default_state
> to recover IOMUX state.
> 
> but I think this way is more simple than driver call
> pinctrl_pm_select_default_state.
> 

I actually tried to experiment with pinctrl_pm_select_default_state and
pinctrl_pm_select_sleep_state. I think, one solution would be to create
sleep states for all drivers. However, it's not necessary to change to a
sleep state, since the controller looses the state anyway. What would be
required is having a function which allows to force the default state
for all pinctrl settings... As far as I can tell, there is no such
functionality currently...? Linus?

--
Stefan


  reply	other threads:[~2015-06-04 20:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 15:12 Stefan Agner
2015-06-04  8:22 ` Linus Walleij
2015-06-04 15:00 ` Zhi Li
2015-06-04 20:24   ` Stefan Agner [this message]
2015-06-10  7:48     ` Linus Walleij

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=9333041871b27a3099b185e26b564e2a@agner.ch \
    --to=stefan@agner.ch \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lznuaa@gmail.com \
    --cc=shawn.guo@freescale.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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

all inboxes | Powered by JetHome®