From: Sudeep Holla <sudeep.holla@arm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
"zhaoyang.huang@linaro.org" <zhaoyang.huang@linaro.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:SUSPEND TO RAM" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"tony@atomide.com" <tony@atomide.com>
Subject: Re: [PATCH] drivers/power/wakeirq: Call device_init_wakeup from dev_pm_set_wake_irq
Date: Mon, 14 Sep 2015 14:43:29 +0100 [thread overview]
Message-ID: <55F6CF01.7000909@arm.com> (raw)
In-Reply-To: <1441119218-31490-1-git-send-email-daniel.lezcano@linaro.org>
(+Tony in case he has any inputs)
Hi Daniel,
On 01/09/15 15:53, Daniel Lezcano wrote:
> The function dev_pm_set_wake_irq is typically called after device_init_wakeup.
>
> Instead of summing a couple of call, let's call device_init_wakeup directly
> from dev_pm_set_wake_irq / dev_pm_clear_wake_irq.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/base/power/wakeirq.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c
> index eb6e674..287a021 100644
> --- a/drivers/base/power/wakeirq.c
> +++ b/drivers/base/power/wakeirq.c
> @@ -60,8 +60,7 @@ static int dev_pm_attach_wake_irq(struct device *dev, int irq,
> *
> * Attach a device IO interrupt as a wake IRQ. The wake IRQ gets
> * automatically configured for wake-up from suspend based
> - * on the device specific sysfs wakeup entry. Typically called
> - * during driver probe after calling device_init_wakeup().
> + * on the device specific sysfs wakeup entry.
> */
> int dev_pm_set_wake_irq(struct device *dev, int irq)
> {
> @@ -75,9 +74,13 @@ int dev_pm_set_wake_irq(struct device *dev, int irq)
> wirq->dev = dev;
> wirq->irq = irq;
>
> + device_init_wakeup(dev, true);
> +
IMO we can move this to dev_pm_attach_wake_irq, so that both
dev_pm_set_dedicated_wake_irq and dev_pm_set_wake_irq are handled at one
place.
Also the first user(drivers/i2c/i2c-core.c) of the API is added in
v4.3-rc1. So you need to fix that as Rafael pointed out initially.
Regards,
Sudeep
prev parent reply other threads:[~2015-09-14 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 14:53 [PATCH] drivers/power/wakeirq: Call device_init_wakeup from dev_pm_set_wake_irq Daniel Lezcano
2015-09-01 23:58 ` Rafael J. Wysocki
2015-09-14 13:43 ` Sudeep Holla [this message]
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=55F6CF01.7000909@arm.com \
--to=sudeep.holla@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=tony@atomide.com \
--cc=zhaoyang.huang@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