All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: linux-kernel@vger.kernel.org
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>,
	Anton Vorontsov <cbou@mail.ru>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] pda_power: add function callbacks for suspend and resume
Date: Fri, 16 Apr 2010 15:44:31 +0200	[thread overview]
Message-ID: <20100416134431.GT30801@buzzloop.caiaq.de> (raw)
In-Reply-To: <1271108002-15574-1-git-send-email-daniel@caiaq.de>

Ping.

On Mon, Apr 12, 2010 at 11:33:22PM +0200, Daniel Mack wrote:
> Add function prototypes for power management events so they can be
> handled and used by platform implementations.
> 
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
> Cc: Anton Vorontsov <cbou@mail.ru>
> Cc: David Woodhouse <dwmw2@infradead.org>
> ---
>  drivers/power/pda_power.c |    9 +++++++++
>  include/linux/pda_power.h |    2 ++
>  2 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
> index a232de6..0b27b9d 100644
> --- a/drivers/power/pda_power.c
> +++ b/drivers/power/pda_power.c
> @@ -404,6 +404,12 @@ static int usb_wakeup_enabled;
>  
>  static int pda_power_suspend(struct platform_device *pdev, pm_message_t state)
>  {
> +	if (pdata->suspend) {
> +		int ret = pdata->suspend(state);
> +		if (ret)
> +			return ret;
> +	}
> +
>  	if (device_may_wakeup(&pdev->dev)) {
>  		if (ac_irq)
>  			ac_wakeup_enabled = !enable_irq_wake(ac_irq->start);
> @@ -423,6 +429,9 @@ static int pda_power_resume(struct platform_device *pdev)
>  			disable_irq_wake(ac_irq->start);
>  	}
>  
> +	if (pdata->resume)
> +		return pdata->resume();
> +
>  	return 0;
>  }
>  #else
> diff --git a/include/linux/pda_power.h b/include/linux/pda_power.h
> index d4cf7a2..c9e4d81 100644
> --- a/include/linux/pda_power.h
> +++ b/include/linux/pda_power.h
> @@ -24,6 +24,8 @@ struct pda_power_pdata {
>  	int (*is_usb_online)(void);
>  	void (*set_charge)(int flags);
>  	void (*exit)(struct device *dev);
> +	int (*suspend)(pm_message_t state);
> +	int (*resume)(void);
>  
>  	char **supplied_to;
>  	size_t num_supplicants;
> -- 
> 1.7.0.3
> 

  reply	other threads:[~2010-04-16 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12 21:33 [PATCH] pda_power: add function callbacks for suspend and resume Daniel Mack
2010-04-16 13:44 ` Daniel Mack [this message]
2010-04-16 15:15 ` Anton Vorontsov

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=20100416134431.GT30801@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=cbou@mail.ru \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.