linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: max8997: Enale irq-wakeup unconditionally
       [not found] <CGME20180905093305eucas1p19cbdec510c32cedaf9a9de58fd2de9e1@eucas1p1.samsung.com>
@ 2018-09-05  9:32 ` Marek Szyprowski
  2018-09-05 10:40   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Szyprowski @ 2018-09-05  9:32 UTC (permalink / raw)
  To: linux-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, MyungJoo Ham, Lee Jones, Bartlomiej Zolnierkiewicz

IRQ wakeup support for MAX8997 driver was initially configured by
respective property in pdata. However, after the driver conversion to
device-tree, setting it was left as 'todo'. Nowadays most of other MAX PMIC
MFD drivers initialized from device-tree simply assume unconditionally that
they can be an irq wakeup source, so enable wakeup support also for
MAX8997. This fixes support for wakeup from MAX8997 RTC alarm.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/mfd/max8997.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 3f554c447521..7155e991cb82 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -152,12 +152,7 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata(
 		return ERR_PTR(-ENOMEM);
 
 	pd->ono = irq_of_parse_and_map(dev->of_node, 1);
-
-	/*
-	 * ToDo: the 'wakeup' member in the platform data is more of a linux
-	 * specfic information. Hence, there is no binding for that yet and
-	 * not parsed here.
-	 */
+	pd->wakeup = true;
 
 	return pd;
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: max8997: Enale irq-wakeup unconditionally
  2018-09-05  9:32 ` [PATCH] mfd: max8997: Enale irq-wakeup unconditionally Marek Szyprowski
@ 2018-09-05 10:40   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-05 10:40 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-samsung-soc, myungjoo.ham, lee.jones,
	Bartłomiej Żołnierkiewicz

On Wed, 5 Sep 2018 at 11:33, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> IRQ wakeup support for MAX8997 driver was initially configured by
> respective property in pdata. However, after the driver conversion to
> device-tree, setting it was left as 'todo'. Nowadays most of other MAX PMIC
> MFD drivers initialized from device-tree simply assume unconditionally that
> they can be an irq wakeup source, so enable wakeup support also for
> MAX8997. This fixes support for wakeup from MAX8997 RTC alarm.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

If you want to have wakeup always, then just remove pd->wakeup and use
always true in device_init_wakeup(). Otherwise (if it still should be
configurable), use wakeup-source property in DTS:
https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/power/wakeup-source.txt

Best regards,
Krzysztof

> ---
>  drivers/mfd/max8997.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
> index 3f554c447521..7155e991cb82 100644
> --- a/drivers/mfd/max8997.c
> +++ b/drivers/mfd/max8997.c
> @@ -152,12 +152,7 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata(
>                 return ERR_PTR(-ENOMEM);
>
>         pd->ono = irq_of_parse_and_map(dev->of_node, 1);
> -
> -       /*
> -        * ToDo: the 'wakeup' member in the platform data is more of a linux
> -        * specfic information. Hence, there is no binding for that yet and
> -        * not parsed here.
> -        */
> +       pd->wakeup = true;
>
>         return pd;
>  }
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-05 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180905093305eucas1p19cbdec510c32cedaf9a9de58fd2de9e1@eucas1p1.samsung.com>
2018-09-05  9:32 ` [PATCH] mfd: max8997: Enale irq-wakeup unconditionally Marek Szyprowski
2018-09-05 10:40   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).