linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] PM / sleep: let slow buses inherit child ignorance
@ 2016-04-07 13:20 Linus Walleij
  2016-04-07 13:20 ` [PATCH 1/3] PM / sleep: add a helper function to " Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Linus Walleij @ 2016-04-07 13:20 UTC (permalink / raw)
  To: Rafael J. Wysocki, Wolfram Sang, Mark Brown, Ulf Hansson
  Cc: linux-pm, Linus Walleij

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


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

end of thread, other threads:[~2016-04-11 11:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 3/3] RFC: spi: let SPI " Linus Walleij
2016-04-07 17:06   ` Mark Brown

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).