* [PATCH v2] mfd: max8997: Disable interrupt handling for suspend/resume cycle
[not found] <CGME20180905143815eucas1p29cb4247cfef8180433d9b4627f5ff883@eucas1p2.samsung.com>
@ 2018-09-05 14:36 ` Marek Szyprowski
2018-09-05 16:29 ` Krzysztof Kozlowski
2018-09-11 14:53 ` Lee Jones
0 siblings, 2 replies; 3+ messages in thread
From: Marek Szyprowski @ 2018-09-05 14:36 UTC (permalink / raw)
To: linux-kernel, linux-samsung-soc
Cc: Marek Szyprowski, MyungJoo Ham, Lee Jones, Bartlomiej Zolnierkiewicz
Disable IRQs during suspend/resume cycle to ensure handling of wakeup
interrupts (i.e. RTC wake alarm) after max8997_resume(). This way it can
be properly handled when I2C bus is finally available. This pattern is
also used in other MAX PMIC MFD drivers.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
changelog:
v2:
- reordered the sequence of operation as suggested by Krzysztof Kozlowski
---
drivers/mfd/max8997.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 3f554c447521..b17eff50ad52 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -468,6 +468,7 @@ static int max8997_suspend(struct device *dev)
struct i2c_client *i2c = to_i2c_client(dev);
struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
+ disable_irq(max8997->irq);
if (device_may_wakeup(dev))
irq_set_irq_wake(max8997->irq, 1);
return 0;
@@ -480,6 +481,7 @@ static int max8997_resume(struct device *dev)
if (device_may_wakeup(dev))
irq_set_irq_wake(max8997->irq, 0);
+ enable_irq(max8997->irq);
return max8997_irq_resume(max8997);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mfd: max8997: Disable interrupt handling for suspend/resume cycle
2018-09-05 14:36 ` [PATCH v2] mfd: max8997: Disable interrupt handling for suspend/resume cycle Marek Szyprowski
@ 2018-09-05 16:29 ` Krzysztof Kozlowski
2018-09-11 14:53 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-05 16:29 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-kernel, linux-samsung-soc, MyungJoo Ham, Lee Jones,
Bartlomiej Zolnierkiewicz
On Wed, Sep 05, 2018 at 04:36:06PM +0200, Marek Szyprowski wrote:
> Disable IRQs during suspend/resume cycle to ensure handling of wakeup
> interrupts (i.e. RTC wake alarm) after max8997_resume(). This way it can
> be properly handled when I2C bus is finally available. This pattern is
> also used in other MAX PMIC MFD drivers.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> changelog:
> v2:
> - reordered the sequence of operation as suggested by Krzysztof Kozlowski
> ---
> drivers/mfd/max8997.c | 2 ++
> 1 file changed, 2 insertions(+)
>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mfd: max8997: Disable interrupt handling for suspend/resume cycle
2018-09-05 14:36 ` [PATCH v2] mfd: max8997: Disable interrupt handling for suspend/resume cycle Marek Szyprowski
2018-09-05 16:29 ` Krzysztof Kozlowski
@ 2018-09-11 14:53 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2018-09-11 14:53 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-kernel, linux-samsung-soc, MyungJoo Ham, Bartlomiej Zolnierkiewicz
On Wed, 05 Sep 2018, Marek Szyprowski wrote:
> Disable IRQs during suspend/resume cycle to ensure handling of wakeup
> interrupts (i.e. RTC wake alarm) after max8997_resume(). This way it can
> be properly handled when I2C bus is finally available. This pattern is
> also used in other MAX PMIC MFD drivers.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> changelog:
> v2:
> - reordered the sequence of operation as suggested by Krzysztof Kozlowski
> ---
> drivers/mfd/max8997.c | 2 ++
> 1 file changed, 2 insertions(+)
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:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20180905143815eucas1p29cb4247cfef8180433d9b4627f5ff883@eucas1p2.samsung.com>
2018-09-05 14:36 ` [PATCH v2] mfd: max8997: Disable interrupt handling for suspend/resume cycle Marek Szyprowski
2018-09-05 16:29 ` Krzysztof Kozlowski
2018-09-11 14:53 ` 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).