linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 0/3] PM / sleep: let slow buses inherit child ignorance
Date: Thu,  7 Apr 2016 15:20:34 +0200	[thread overview]
Message-ID: <1460035237-12037-1-git-send-email-linus.walleij@linaro.org> (raw)

I ran into a problem when using runtime_force_suspend()/resume()
on a target I2C device.

After some root causing I realized this is because slow buses create
struct device-containing masters from hardware devices, that do not
inherit the child ignorance setting, while they should.

Children on a slow message-oriented bus like I2C or SPI do not need
their I2C/SPI (etc) host to be up and running all the time in order
to go into a resumed state.

It is more customary for such busses to go online at the instant
that a driver or child signals that it want to transfer a message
on the bus.

Some drivers (such as drivers/i2c/busses/i2c-nomadik.c) have the
.ignore_children flag set properly in their main device and have
runtime PM running, but run into weird phenomena when their
children want to resume from sleep.

The most details are in the I2C patch [2/3].

The third patch is here to illustrate that the problem is present
in all slow external busses.

Linus Walleij (3):
  PM / sleep: add a helper function to inherit child ignorance
  i2c: let I2C masters inherit suspend child ignorance
  RFC: spi: let SPI masters inherit suspend child ignorance

 drivers/i2c/i2c-core.c | 1 +
 drivers/spi/spi.c      | 1 +
 include/linux/device.h | 7 +++++++
 3 files changed, 9 insertions(+)

-- 
2.4.3


             reply	other threads:[~2016-04-07 13:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 13:20 Linus Walleij [this message]
2016-04-07 13:20 ` [PATCH 1/3] PM / sleep: add a helper function to inherit child ignorance 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 ` [PATCH 3/3] RFC: spi: let SPI " Linus Walleij
2016-04-07 17:06   ` 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-1-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).