diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-23 16:18:51 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-10 12:25:12 +0000 |
commit | fb8695e3749ee6f19e0b524ec6dd78b1f8a82586 (patch) | |
tree | 19e096a220593d38ebcf7c8b5268b21e6c13dc82 /drivers/spi/spi-bcm63xx-hsspi.c | |
parent | 2d13f2ff60732a7f7accc250da8856650beb0d6f (diff) | |
download | lwn-fb8695e3749ee6f19e0b524ec6dd78b1f8a82586.tar.gz lwn-fb8695e3749ee6f19e0b524ec6dd78b1f8a82586.zip |
spi: bcm63xx-hsspi: fix pm_runtime
The driver sets auto_runtime_pm to true, but it doesn't call
pm_runtime_enable(), which results in "Failed to power device" when PM support
is enabled.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://lore.kernel.org/r/20210223151851.4110-3-noltari@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-bcm63xx-hsspi.c')
-rw-r--r-- | drivers/spi/spi-bcm63xx-hsspi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 1f08d7553f07..b871fd810d80 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -21,6 +21,7 @@ #include <linux/mutex.h> #include <linux/of.h> #include <linux/reset.h> +#include <linux/pm_runtime.h> #define HSSPI_GLOBAL_CTRL_REG 0x0 #define GLOBAL_CTRL_CS_POLARITY_SHIFT 0 @@ -439,13 +440,17 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) if (ret) goto out_put_master; + pm_runtime_enable(&pdev->dev); + /* register and we are done */ ret = devm_spi_register_master(dev, master); if (ret) - goto out_put_master; + goto out_pm_disable; return 0; +out_pm_disable: + pm_runtime_disable(&pdev->dev); out_put_master: spi_master_put(master); out_disable_pll_clk: |