public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@st.com>
To: "rjw@sisk.pl" <rjw@sisk.pl>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>
Cc: "baruch@tkos.co.il" <baruch@tkos.co.il>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Armando VISCONTI <armando.visconti@st.com>,
	Shiraz HASHIM <shiraz.hashim@st.com>,
	Vipin KUMAR <vipin.kumar@st.com>,
	Rajeev KUMAR <rajeev-dlh.kumar@st.com>,
	Deepak SIKRI <deepak.sikri@st.com>,
	Vipul Kumar SAMAR <vipulkumar.samar@st.com>,
	Amit VIRDI <Amit.VIRDI@st.com>,
	Pratyush ANAND <pratyush.anand@st.com>,
	Bhupesh SHARMA <bhupesh.sharma@st.com>,
	"viresh.linux@gmail.com" <viresh.linux@gmail.com>,
	Bhavna YADAV <bhavna.yadav@st.com>,
	Vincenzo FRASCINO <Vincenzo.FRASCINO@st.com>,
	Mirko GARDI <mirko.gardi@st.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] gpio/gpio-pl061: No need of thaw and poweroff routines for hibernate
Date: Thu, 16 Feb 2012 16:28:37 +0530	[thread overview]
Message-ID: <4F3CE15D.6010902@st.com> (raw)
In-Reply-To: <7662253849428ce018fb7f7359e0585fca9fb597.1326274467.git.viresh.kumar@st.com>

On 1/11/2012 3:25 PM, Viresh KUMAR wrote:
> pl061 uses same routines for suspend/freeze/poweroff and resume/thaw/restore.
> We are only saving and restoring register values on these routines.
> 
> During hibernation, in freeze() we take a snapshot of gpio registers. In thaw()
> we don't actually need to restore these registers, as power was never shut down
> till now. Similarly, in poweroff() we don't need to take snapshot of these
> registers again, as it was done during freeze() and by now the image is already
> saved on disk.
> 
> This patch passes poweroff() and thaw() routines as NULL to avoid this extra
> work done.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> ---

Hi Grant/Rafael,

Any feedback on the below patch?

>  drivers/gpio/gpio-pl061.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
> index 84ba1dd..45b884b 100644
> --- a/drivers/gpio/gpio-pl061.c
> +++ b/drivers/gpio/gpio-pl061.c
> @@ -430,7 +430,12 @@ static int pl061_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static SIMPLE_DEV_PM_OPS(pl061_dev_pm_ops, pl061_suspend, pl061_resume);
> +static const struct dev_pm_ops pl061_dev_pm_ops = {
> +	.suspend = pl061_suspend,
> +	.resume = pl061_resume,
> +	.freeze = pl061_suspend,
> +	.restore = pl061_resume,
> +};
>  #endif
>  
>  static struct amba_id pl061_ids[] = {


-- 
viresh

  reply	other threads:[~2012-02-16 10:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11  9:55 [PATCH] gpio/gpio-pl061: No need of thaw and poweroff routines for hibernate Viresh Kumar
2012-02-16 10:58 ` Viresh Kumar [this message]
2012-02-16 13:38 ` Grant Likely

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=4F3CE15D.6010902@st.com \
    --to=viresh.kumar@st.com \
    --cc=Amit.VIRDI@st.com \
    --cc=Vincenzo.FRASCINO@st.com \
    --cc=armando.visconti@st.com \
    --cc=baruch@tkos.co.il \
    --cc=bhavna.yadav@st.com \
    --cc=bhupesh.sharma@st.com \
    --cc=deepak.sikri@st.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirko.gardi@st.com \
    --cc=pratyush.anand@st.com \
    --cc=rajeev-dlh.kumar@st.com \
    --cc=rjw@sisk.pl \
    --cc=shiraz.hashim@st.com \
    --cc=vipin.kumar@st.com \
    --cc=vipulkumar.samar@st.com \
    --cc=viresh.linux@gmail.com \
    /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