From: Linus Walleij <linus.walleij@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Wolfram Sang <wsa@the-dreams.de>, Mark Brown <broonie@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-pm@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 3/3] RFC: spi: let SPI masters inherit suspend child ignorance
Date: Thu, 7 Apr 2016 15:20:37 +0200 [thread overview]
Message-ID: <1460035237-12037-4-git-send-email-linus.walleij@linaro.org> (raw)
In-Reply-To: <1460035237-12037-1-git-send-email-linus.walleij@linaro.org>
This patch is analogous to the I2C patch preceding it
and the reasoning is the same for all slow busses
where the master device should only wake up when
messages get transferred rather than constantly
babysitting its children.
the master devices need to inherit the child ignorance
from their hardware device (whether AMBA device or
platform device etc) so that the children on the
external bus see that they are actively ignored by their
parent and can runtime_force_resume() from system suspend
without getting an error code.
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Mark: mostly trying to bring home a point here and fix
it in all places if possible. No SPI master seems to be
ignoring its children for the moment but I have a patch
for the spi-pl022 doing this (ignoring its children)
I just need to find a suitable test target.
---
drivers/spi/spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index de2f2f90d799..48affabd170a 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1764,6 +1764,7 @@ struct spi_master *spi_alloc_master(struct device *dev, unsigned size)
master->num_chipselect = 1;
master->dev.class = &spi_master_class;
master->dev.parent = dev;
+ pm_suspend_inherit_ignore_children(&master->dev);
spi_master_set_devdata(master, &master[1]);
return master;
--
2.4.3
next prev parent reply other threads:[~2016-04-07 13:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 13:20 [PATCH 0/3] PM / sleep: let slow buses inherit child ignorance Linus Walleij
2016-04-07 13:20 ` [PATCH 1/3] PM / sleep: add a helper function to " Linus Walleij
2016-04-11 11:54 ` Linus Walleij
2016-04-07 13:20 ` [PATCH 2/3] i2c: let I2C masters inherit suspend " Linus Walleij
2016-04-11 6:53 ` Linus Walleij
2016-04-11 6:58 ` Mark Brown
2016-04-07 13:20 ` Linus Walleij [this message]
2016-04-07 17:06 ` [PATCH 3/3] RFC: spi: let SPI " Mark Brown
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=1460035237-12037-4-git-send-email-linus.walleij@linaro.org \
--to=linus.walleij@linaro.org \
--cc=broonie@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@linaro.org \
--cc=wsa@the-dreams.de \
/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).