linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mfd: max8997: Enale irq-wakeup unconditionally
       [not found] <CGME20180905115422eucas1p2150fd04724ec667bd8798023a73f1127@eucas1p2.samsung.com>
@ 2018-09-05 11:54 ` Marek Szyprowski
  2018-09-05 13:39   ` Krzysztof Kozlowski
  2018-09-11 14:44   ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Szyprowski @ 2018-09-05 11:54 UTC (permalink / raw)
  To: linux-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, MyungJoo Ham, Lee Jones, Bartlomiej Zolnierkiewicz

IRQ wake up 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 PMIC MFD
drivers initialized from device-tree assume that they can be an irq wakeup
source, so enable it also for MAX8997. This fixes support for wakeup from
MAX8997 RTC alarm.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
changelog:
v2:
- removed pdata->wakeup entry as suggested by Krzysztof Kozlowski
---
 drivers/mfd/max8997.c       | 8 +-------
 include/linux/mfd/max8997.h | 1 -
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 3f554c447521..d1495d76bf2c 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -153,12 +153,6 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata(
 
 	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.
-	 */
-
 	return pd;
 }
 
@@ -246,7 +240,7 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
 	 */
 
 	/* MAX8997 has a power button input. */
-	device_init_wakeup(max8997->dev, pdata->wakeup);
+	device_init_wakeup(max8997->dev, true);
 
 	return ret;
 
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h
index cf815577bd68..3ae1fe743bc3 100644
--- a/include/linux/mfd/max8997.h
+++ b/include/linux/mfd/max8997.h
@@ -178,7 +178,6 @@ struct max8997_led_platform_data {
 struct max8997_platform_data {
 	/* IRQ */
 	int ono;
-	int wakeup;
 
 	/* ---- PMIC ---- */
 	struct max8997_regulator_data *regulators;
-- 
2.17.1


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

* Re: [PATCH v2] mfd: max8997: Enale irq-wakeup unconditionally
  2018-09-05 11:54 ` [PATCH v2] mfd: max8997: Enale irq-wakeup unconditionally Marek Szyprowski
@ 2018-09-05 13:39   ` Krzysztof Kozlowski
  2018-09-11 14:44   ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-05 13:39 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 13:54, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> IRQ wake up 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 PMIC MFD
> drivers initialized from device-tree assume that they can be an irq wakeup
> source, so enable it also for MAX8997. This fixes support for wakeup from
> MAX8997 RTC alarm.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> changelog:
> v2:
> - removed pdata->wakeup entry as suggested by Krzysztof Kozlowski
> ---
>  drivers/mfd/max8997.c       | 8 +-------
>  include/linux/mfd/max8997.h | 1 -
>  2 files changed, 1 insertion(+), 8 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH v2] mfd: max8997: Enale irq-wakeup unconditionally
  2018-09-05 11:54 ` [PATCH v2] mfd: max8997: Enale irq-wakeup unconditionally Marek Szyprowski
  2018-09-05 13:39   ` Krzysztof Kozlowski
@ 2018-09-11 14:44   ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2018-09-11 14:44 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-kernel, linux-samsung-soc, MyungJoo Ham, Bartlomiej Zolnierkiewicz

On Wed, 05 Sep 2018, Marek Szyprowski wrote:

> IRQ wake up 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 PMIC MFD
> drivers initialized from device-tree assume that they can be an irq wakeup
> source, so enable it also for MAX8997. This fixes support for wakeup from
> MAX8997 RTC alarm.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> changelog:
> v2:
> - removed pdata->wakeup entry as suggested by Krzysztof Kozlowski
> ---
>  drivers/mfd/max8997.c       | 8 +-------
>  include/linux/mfd/max8997.h | 1 -
>  2 files changed, 1 insertion(+), 8 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2018-09-11 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180905115422eucas1p2150fd04724ec667bd8798023a73f1127@eucas1p2.samsung.com>
2018-09-05 11:54 ` [PATCH v2] mfd: max8997: Enale irq-wakeup unconditionally Marek Szyprowski
2018-09-05 13:39   ` Krzysztof Kozlowski
2018-09-11 14:44   ` Lee Jones

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).