Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd271f17 authored by Álvaro Fernández Rojas's avatar Álvaro Fernández Rojas Committed by Greg Kroah-Hartman
Browse files

spi: bcm63xx-hsspi: fix pm_runtime



[ Upstream commit 216e8e80057a9f0b6366327881acf88eaf9f1fd4 ]

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-3-noltari@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Stable-dep-of: 811ff802aaf8 ("spi: bcm63xx-hsspi: Fix multi-bit mode setting")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 904b717b
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -20,6 +20,8 @@
#include <linux/spi/spi.h>
#include <linux/spi/spi.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of.h>
#include <linux/reset.h>
#include <linux/pm_runtime.h>


#define HSSPI_GLOBAL_CTRL_REG			0x0
#define HSSPI_GLOBAL_CTRL_REG			0x0
#define GLOBAL_CTRL_CS_POLARITY_SHIFT		0
#define GLOBAL_CTRL_CS_POLARITY_SHIFT		0
@@ -428,13 +430,17 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
	if (ret)
	if (ret)
		goto out_put_master;
		goto out_put_master;


	pm_runtime_enable(&pdev->dev);

	/* register and we are done */
	/* register and we are done */
	ret = devm_spi_register_master(dev, master);
	ret = devm_spi_register_master(dev, master);
	if (ret)
	if (ret)
		goto out_put_master;
		goto out_pm_disable;


	return 0;
	return 0;


out_pm_disable:
	pm_runtime_disable(&pdev->dev);
out_put_master:
out_put_master:
	spi_master_put(master);
	spi_master_put(master);
out_disable_pll_clk:
out_disable_pll_clk: