Message ID | 1460035237-12037-2-git-send-email-linus.walleij@linaro.org |
---|---|
State | New |
Headers | show |
On Thu, Apr 7, 2016 at 3:20 PM, Linus Walleij <linus.walleij@linaro.org> wrote: > A few subsystems dealing with peripherals on slow buses with > transfer-oriented runtime PM will need to inherit the child > ignorance property of their parent hardware devices. > > Especially struct i2c_adapter and struct spi_master needs > this. > > This adds a helper function to deal with this and make it > clear what is going on. > > 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> Just drop this, I submitted new patches to simply mark all I2C adapters and SPI hosts as ignoring their children. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/linux/device.h b/include/linux/device.h index 002c59728dbe..675c09e62239 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -961,6 +961,13 @@ static inline void pm_suspend_ignore_children(struct device *dev, bool enable) dev->power.ignore_children = enable; } +static inline void pm_suspend_inherit_ignore_children(struct device *dev) +{ + if (!dev->parent) + return; + dev->power.ignore_children = dev->parent->power.ignore_children; +} + static inline void dev_pm_syscore_device(struct device *dev, bool val) { #ifdef CONFIG_PM_SLEEP
A few subsystems dealing with peripherals on slow buses with transfer-oriented runtime PM will need to inherit the child ignorance property of their parent hardware devices. Especially struct i2c_adapter and struct spi_master needs this. This adds a helper function to deal with this and make it clear what is going on. 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> --- include/linux/device.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html