All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] spi: bcm63xx: fix pm_runtime
@ 2021-02-23 15:18 ` Álvaro Fernández Rojas
  0 siblings, 0 replies; 7+ messages in thread
From: Álvaro Fernández Rojas @ 2021-02-23 15:18 UTC (permalink / raw)
  To: jonas.gorski, Mark Brown, Florian Fainelli,
	bcm-kernel-feedback-list, linux-spi, linux-arm-kernel,
	linux-kernel
  Cc: Álvaro Fernández Rojas

Both BCM63xx SPI drivers enable auto_runtime_pm, but they don't call
pm_runtime_enable(), which results in "Failed to power device" when PM support
is enabled.

Álvaro Fernández Rojas (2):
  spi: bcm63xx-spi: fix pm_runtime
  spi: bcm63xx-hsspi: fix pm_runtime

 drivers/spi/spi-bcm63xx-hsspi.c | 7 ++++++-
 drivers/spi/spi-bcm63xx.c       | 6 +++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 0/2] spi: bcm63xx: fix pm_runtime
@ 2021-02-23 15:18 ` Álvaro Fernández Rojas
  0 siblings, 0 replies; 7+ messages in thread
From: Álvaro Fernández Rojas @ 2021-02-23 15:18 UTC (permalink / raw)
  To: jonas.gorski, Mark Brown, Florian Fainelli,
	bcm-kernel-feedback-list, linux-spi, linux-arm-kernel,
	linux-kernel
  Cc: Álvaro Fernández Rojas

Both BCM63xx SPI drivers enable auto_runtime_pm, but they don't call
pm_runtime_enable(), which results in "Failed to power device" when PM support
is enabled.

Álvaro Fernández Rojas (2):
  spi: bcm63xx-spi: fix pm_runtime
  spi: bcm63xx-hsspi: fix pm_runtime

 drivers/spi/spi-bcm63xx-hsspi.c | 7 ++++++-
 drivers/spi/spi-bcm63xx.c       | 6 +++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] spi: bcm63xx-spi: fix pm_runtime
  2021-02-23 15:18 ` Álvaro Fernández Rojas
@ 2021-02-23 15:18   ` Álvaro Fernández Rojas
  -1 siblings, 0 replies; 7+ messages in thread
From: Álvaro Fernández Rojas @ 2021-02-23 15:18 UTC (permalink / raw)
  To: jonas.gorski, Mark Brown, Florian Fainelli,
	bcm-kernel-feedback-list, linux-spi, linux-arm-kernel,
	linux-kernel
  Cc: Álvaro Fernández Rojas

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>
---
 drivers/spi/spi-bcm63xx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 96d075e633f4..d08bb7600150 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -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:
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 1/2] spi: bcm63xx-spi: fix pm_runtime
@ 2021-02-23 15:18   ` Álvaro Fernández Rojas
  0 siblings, 0 replies; 7+ messages in thread
From: Álvaro Fernández Rojas @ 2021-02-23 15:18 UTC (permalink / raw)
  To: jonas.gorski, Mark Brown, Florian Fainelli,
	bcm-kernel-feedback-list, linux-spi, linux-arm-kernel,
	linux-kernel
  Cc: Álvaro Fernández Rojas

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>
---
 drivers/spi/spi-bcm63xx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 96d075e633f4..d08bb7600150 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -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:
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] spi: bcm63xx-hsspi: fix pm_runtime
  2021-02-23 15:18 ` Álvaro Fernández Rojas
@ 2021-02-23 15:18   ` Álvaro Fernández Rojas
  -1 siblings, 0 replies; 7+ messages in thread
From: Álvaro Fernández Rojas @ 2021-02-23 15:18 UTC (permalink / raw)
  To: jonas.gorski, Mark Brown, Florian Fainelli,
	bcm-kernel-feedback-list, linux-spi, linux-arm-kernel,
	linux-kernel
  Cc: Álvaro Fernández Rojas

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>
---
 drivers/spi/spi-bcm63xx-hsspi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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:
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] spi: bcm63xx-hsspi: fix pm_runtime
@ 2021-02-23 15:18   ` Álvaro Fernández Rojas
  0 siblings, 0 replies; 7+ messages in thread
From: Álvaro Fernández Rojas @ 2021-02-23 15:18 UTC (permalink / raw)
  To: jonas.gorski, Mark Brown, Florian Fainelli,
	bcm-kernel-feedback-list, linux-spi, linux-arm-kernel,
	linux-kernel
  Cc: Álvaro Fernández Rojas

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>
---
 drivers/spi/spi-bcm63xx-hsspi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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:
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] spi: bcm63xx: fix pm_runtime
  2021-02-23 15:18 ` Álvaro Fernández Rojas
                   ` (2 preceding siblings ...)
  (?)
@ 2021-02-24 16:58 ` Mark Brown
  -1 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-02-24 16:58 UTC (permalink / raw)
  To: linux-kernel, Florian Fainelli, bcm-kernel-feedback-list,
	linux-spi, Álvaro Fernández Rojas, jonas.gorski,
	linux-arm-kernel

On Tue, 23 Feb 2021 16:18:49 +0100, Álvaro Fernández Rojas wrote:
> Both BCM63xx SPI drivers enable auto_runtime_pm, but they don't call
> pm_runtime_enable(), which results in "Failed to power device" when PM support
> is enabled.
> 
> Álvaro Fernández Rojas (2):
>   spi: bcm63xx-spi: fix pm_runtime
>   spi: bcm63xx-hsspi: fix pm_runtime
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: bcm63xx-spi: fix pm_runtime
      commit: 73ae625da5c36300fccd809738e7c68f49ebce35
[2/2] spi: bcm63xx-hsspi: fix pm_runtime
      commit: 216e8e80057a9f0b6366327881acf88eaf9f1fd4

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-24 17:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 15:18 [PATCH 0/2] spi: bcm63xx: fix pm_runtime Álvaro Fernández Rojas
2021-02-23 15:18 ` Álvaro Fernández Rojas
2021-02-23 15:18 ` [PATCH 1/2] spi: bcm63xx-spi: " Álvaro Fernández Rojas
2021-02-23 15:18   ` Álvaro Fernández Rojas
2021-02-23 15:18 ` [PATCH 2/2] spi: bcm63xx-hsspi: " Álvaro Fernández Rojas
2021-02-23 15:18   ` Álvaro Fernández Rojas
2021-02-24 16:58 ` [PATCH 0/2] spi: bcm63xx: " Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.