* [PATCH v3] i2c: exynos5: Properly use the "noirq" variants of suspend/resume
@ 2014-06-25 16:39 Doug Anderson
[not found] ` <1403714360-7581-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Doug Anderson @ 2014-06-25 16:39 UTC (permalink / raw)
To: Wolfram Sang, Kukjin Kim
Cc: Tomasz Figa, javier.martinez, ch.naveen, Doug Anderson, jg1.han,
jdelvare, sjg, paul.gortmaker, standby24x7, sachin.kamat,
linux-i2c, linux-arm-kernel, linux-samsung-soc, linux-kernel
The original code for the exynos i2c controller registered for the
"noirq" variants. However during review feedback it was moved to
SIMPLE_DEV_PM_OPS without anyone noticing that it meant we were no
longer actually "noirq" (despite functions named
exynos5_i2c_suspend_noirq and exynos5_i2c_resume_noirq).
i2c controllers that might have wakeup sources on them seem to need to
resume at noirq time so that the individual drivers can actually read
the i2c bus to handle their wakeup.
NOTE: I took the original review feedback from Wolfram and added
poweroff, thaw, freeze, restore.
This patch has only been compile-tested since I don't have all the
patches needed to make my machine using this i2c driver actually
suspend/resume.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
---
Changes in v3:
- Made the structure static.
Changes in v2:
- Added missing CONFIG_PM_SLEEP
drivers/i2c/busses/i2c-exynos5.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 63d2292..f9447a4 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -789,8 +789,16 @@ static int exynos5_i2c_resume_noirq(struct device *dev)
}
#endif
-static SIMPLE_DEV_PM_OPS(exynos5_i2c_dev_pm_ops, exynos5_i2c_suspend_noirq,
- exynos5_i2c_resume_noirq);
+static const struct dev_pm_ops exynos5_i2c_dev_pm_ops = {
+#ifdef CONFIG_PM_SLEEP
+ .suspend_noirq = exynos5_i2c_suspend_noirq,
+ .resume_noirq = exynos5_i2c_resume_noirq,
+ .freeze_noirq = exynos5_i2c_suspend_noirq,
+ .thaw_noirq = exynos5_i2c_resume_noirq,
+ .poweroff_noirq = exynos5_i2c_suspend_noirq,
+ .restore_noirq = exynos5_i2c_resume_noirq,
+#endif
+};
static struct platform_driver exynos5_i2c_driver = {
.probe = exynos5_i2c_probe,
--
2.0.0.526.g5318336
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] i2c: exynos5: Properly use the "noirq" variants of suspend/resume
[not found] ` <1403714360-7581-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
@ 2014-07-16 17:30 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2014-07-16 17:30 UTC (permalink / raw)
To: Doug Anderson
Cc: Kukjin Kim, Tomasz Figa, javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ,
ch.naveen-Sze3O3UU22JBDgjK7y7TUQ, jg1.han-Sze3O3UU22JBDgjK7y7TUQ,
jdelvare-l3A5Bk7waGM, sjg-hpIqsD4AKlfQT0dZR+AlfA,
paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ,
standby24x7-Re5JQEeQqe8AvxtiuMwx3w,
sachin.kamat-QSEj5FYQhm4dnm+yROfE0A,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]
On Wed, Jun 25, 2014 at 09:39:20AM -0700, Doug Anderson wrote:
> The original code for the exynos i2c controller registered for the
> "noirq" variants. However during review feedback it was moved to
> SIMPLE_DEV_PM_OPS without anyone noticing that it meant we were no
> longer actually "noirq" (despite functions named
> exynos5_i2c_suspend_noirq and exynos5_i2c_resume_noirq).
>
> i2c controllers that might have wakeup sources on them seem to need to
> resume at noirq time so that the individual drivers can actually read
> the i2c bus to handle their wakeup.
>
> NOTE: I took the original review feedback from Wolfram and added
> poweroff, thaw, freeze, restore.
>
> This patch has only been compile-tested since I don't have all the
> patches needed to make my machine using this i2c driver actually
> suspend/resume.
>
> Signed-off-by: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Acked-by: Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-16 17:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 16:39 [PATCH v3] i2c: exynos5: Properly use the "noirq" variants of suspend/resume Doug Anderson
[not found] ` <1403714360-7581-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-07-16 17:30 ` Wolfram Sang
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).