Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1224162 > unrolled thread

Re: [PATCH] drivers/power/wakeirq: Call device_init_wakeup from dev_pm_set_wake_irq

Started bySudeep Holla <sudeep.holla@arm.com>
First post2015-09-14 15:50 +0200
Last post2015-09-14 15:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] drivers/power/wakeirq: Call device_init_wakeup from  dev_pm_set_wake_irq Sudeep Holla <sudeep.holla@arm.com> - 2015-09-14 15:50 +0200

#1224162 — Re: [PATCH] drivers/power/wakeirq: Call device_init_wakeup from dev_pm_set_wake_irq

FromSudeep Holla <sudeep.holla@arm.com>
Date2015-09-14 15:50 +0200
SubjectRe: [PATCH] drivers/power/wakeirq: Call device_init_wakeup from dev_pm_set_wake_irq
Message-ID<q8CiS-7Pp-23@gated-at.bofh.it>
(+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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web