Commit 2d13f2ff authored by Álvaro Fernández Rojas's avatar Álvaro Fernández Rojas Committed by Mark Brown

spi: bcm63xx-spi: 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: default avatarÁlvaro Fernández Rojas <noltari@gmail.com>
Link: https://lore.kernel.org/r/20210223151851.4110-2-noltari@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1d309cd6
......@@ -593,11 +593,13 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS);
pm_runtime_enable(&pdev->dev);
/* register and we are done */
ret = devm_spi_register_master(dev, master);
if (ret) {
dev_err(dev, "spi register failed\n");
goto out_clk_disable;
goto out_pm_disable;
}
dev_info(dev, "at %pr (irq %d, FIFOs size %d)\n",
......@@ -605,6 +607,8 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
return 0;
out_pm_disable:
pm_runtime_disable(&pdev->dev);
out_clk_disable:
clk_disable_unprepare(clk);
out_err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment