linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeffy Chen <jeffy.chen@rock-chips.com>
To: linux-kernel@vger.kernel.org
Cc: briannorris@chromium.org, broonie@kernel.org,
	dianders@chromium.org, Jeffy Chen <jeffy.chen@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-spi@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH 1/2] spi: rockchip: Convert to late and early system PM callbacks
Date: Fri, 13 Oct 2017 18:41:37 +0800	[thread overview]
Message-ID: <20171013104138.3216-2-jeffy.chen@rock-chips.com> (raw)
In-Reply-To: <20171013104138.3216-1-jeffy.chen@rock-chips.com>

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@rock-chips.com>
---

 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

  reply	other threads:[~2017-10-13 10:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 10:41 [RESEND PATCH 0/2] rockchip: kevin: Enable edp display Jeffy Chen
2017-10-13 10:41 ` Jeffy Chen [this message]
2017-10-13 15:32   ` [RESEND PATCH 1/2] spi: rockchip: Convert to late and early system PM callbacks Doug Anderson
2017-10-13 15:51     ` Brian Norris
     [not found]       ` <20171013155120.GA137489-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2017-10-13 16:42         ` Mark Brown
2017-10-13 18:19           ` jeffy
     [not found]             ` <59E103B0.8060705-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-10-13 18:25               ` jeffy
2017-10-13 18:30                 ` Dmitry Torokhov
2017-10-13 18:30               ` Dmitry Torokhov
2017-10-13 18:37                 ` Mark Brown
     [not found]                   ` <20171013183750.piabs7m3dnpabnkm-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-10-13 23:45                     ` Dmitry Torokhov
2017-10-14  0:15                       ` Rafael J. Wysocki
     [not found]                         ` <1617641.TtuYKIH8aZ-yvgW3jdyMHm1GS7QM15AGw@public.gmane.org>
2017-10-14  8:59                           ` Mark Brown
2017-10-13 18:44                 ` jeffy
2017-10-13 19:01                   ` jeffy
     [not found] ` <20171013104138.3216-1-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-10-13 15:34   ` [RESEND PATCH 0/2] rockchip: kevin: Enable edp display Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171013104138.3216-2-jeffy.chen@rock-chips.com \
    --to=jeffy.chen@rock-chips.com \
    --cc=briannorris@chromium.org \
    --cc=broonie@kernel.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).