All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] spi: rockchip: Convert to late and early system PM callbacks
@ 2017-10-13 10:01 ` Jeffy Chen
  0 siblings, 0 replies; 11+ messages in thread
From: Jeffy Chen @ 2017-10-13 10:01 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, Heiko Stuebner,
	Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Currently we are suspending the spi master in it's ->suspend callback,
which is racy as some other drivers may still want to transmit messages
on the bus(e.g. spi based pwm backlight).

Convert to late and early system PM callbacks to avoid the race.

Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

 drivers/spi/spi-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index fdcf3076681b..ae539c735ea6 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -914,7 +914,7 @@ static int rockchip_spi_runtime_resume(struct device *dev)
 #endif /* CONFIG_PM */
 
 static const struct dev_pm_ops rockchip_spi_pm = {
-	SET_SYSTEM_SLEEP_PM_OPS(rockchip_spi_suspend, rockchip_spi_resume)
+	SET_LATE_SYSTEM_SLEEP_PM_OPS(rockchip_spi_suspend, rockchip_spi_resume)
 	SET_RUNTIME_PM_OPS(rockchip_spi_runtime_suspend,
 			   rockchip_spi_runtime_resume, NULL)
 };
-- 
2.11.0


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-10-13 10:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-13 10:01 [PATCH 1/2] spi: rockchip: Convert to late and early system PM callbacks Jeffy Chen
2017-10-13 10:01 ` Jeffy Chen
2017-10-13 10:01 ` Jeffy Chen
2017-10-13 10:01 ` [PATCH 2/2] arm64: dts: rockchip: Enable edp disaplay on kevin Jeffy Chen
2017-10-13 10:01   ` Jeffy Chen
     [not found] ` <20171013100116.8271-1-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-10-13 10:17   ` [PATCH 1/2] spi: rockchip: Convert to late and early system PM callbacks Mark Brown
2017-10-13 10:17     ` Mark Brown
2017-10-13 10:17     ` Mark Brown
     [not found]     ` <20171013101719.bophbiz7qb5wi7n2-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-10-13 10:47       ` jeffy
2017-10-13 10:47         ` jeffy
2017-10-13 10:47         ` jeffy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.