spi: let SPI masters ignore their children for PM
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 11 Apr 2016 11:51:03 +0000 (13:51 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 12 Apr 2016 03:48:31 +0000 (04:48 +0100)
Let all SPI masters ignore their children: when it comes
to power management: SPI children have no business doing
keeping their parents awake: they are completely autonomous
devices that just use their parent to talk, and the latter
usecase must be power managed by the host itself on a
per-message basis.

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c

index de2f2f90d7995a52ce4f803cf41ba32992e2664b..6c4c050e6b651742bdb09f3e7b03c044d9174d50 100644 (file)
@@ -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_ignore_children(&master->dev, true);
        spi_master_set_devdata(master, &master[1]);
 
        return master;