linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: pxa2xx: Remove the shutdown callback
@ 2018-09-17 12:11 Lubomir Rintel
  2018-09-17 21:34 ` Applied "spi: pxa2xx: Remove the shutdown callback" to the spi tree Mark Brown
  2018-11-03 19:13 ` [PATCH] spi: pxa2xx: Remove the shutdown callback Pavel Machek
  0 siblings, 2 replies; 3+ messages in thread
From: Lubomir Rintel @ 2018-09-17 12:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-spi, Lubomir Rintel, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Mark Brown

It makes no sense to remove the device on shutdown. And it break things
when the hardware crucial for shutdown (such as the embedded controller)
is attached to the SPI bus.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 drivers/spi/spi-pxa2xx.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 14f4ea59caff..b06f37fb29f6 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1764,14 +1764,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static void pxa2xx_spi_shutdown(struct platform_device *pdev)
-{
-	int status = 0;
-
-	if ((status = pxa2xx_spi_remove(pdev)) != 0)
-		dev_err(&pdev->dev, "shutdown failed with %d\n", status);
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int pxa2xx_spi_suspend(struct device *dev)
 {
@@ -1851,7 +1843,6 @@ static struct platform_driver driver = {
 	},
 	.probe = pxa2xx_spi_probe,
 	.remove = pxa2xx_spi_remove,
-	.shutdown = pxa2xx_spi_shutdown,
 };
 
 static int __init pxa2xx_spi_init(void)
-- 
2.17.1

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

* Applied "spi: pxa2xx: Remove the shutdown callback" to the spi tree
  2018-09-17 12:11 [PATCH] spi: pxa2xx: Remove the shutdown callback Lubomir Rintel
@ 2018-09-17 21:34 ` Mark Brown
  2018-11-03 19:13 ` [PATCH] spi: pxa2xx: Remove the shutdown callback Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2018-09-17 21:34 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: Mark Brown, linux-kernel, linux-spi, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Mark Brown, linux-spi

The patch

   spi: pxa2xx: Remove the shutdown callback

has been applied to the spi tree at

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

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

>From 8089babee17c09cdd51ac1390e444ee0be0c2291 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Mon, 17 Sep 2018 14:11:24 +0200
Subject: [PATCH] spi: pxa2xx: Remove the shutdown callback

It makes no sense to remove the device on shutdown. And it break things
when the hardware crucial for shutdown (such as the embedded controller)
is attached to the SPI bus.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-pxa2xx.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index e3cbc66a7061..fc9aac214239 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1764,14 +1764,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static void pxa2xx_spi_shutdown(struct platform_device *pdev)
-{
-	int status = 0;
-
-	if ((status = pxa2xx_spi_remove(pdev)) != 0)
-		dev_err(&pdev->dev, "shutdown failed with %d\n", status);
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int pxa2xx_spi_suspend(struct device *dev)
 {
@@ -1845,7 +1837,6 @@ static struct platform_driver driver = {
 	},
 	.probe = pxa2xx_spi_probe,
 	.remove = pxa2xx_spi_remove,
-	.shutdown = pxa2xx_spi_shutdown,
 };
 
 static int __init pxa2xx_spi_init(void)
-- 
2.19.0

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

* Re: [PATCH] spi: pxa2xx: Remove the shutdown callback
  2018-09-17 12:11 [PATCH] spi: pxa2xx: Remove the shutdown callback Lubomir Rintel
  2018-09-17 21:34 ` Applied "spi: pxa2xx: Remove the shutdown callback" to the spi tree Mark Brown
@ 2018-11-03 19:13 ` Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2018-11-03 19:13 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: linux-kernel, linux-spi, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]

On Mon 2018-09-17 14:11:24, Lubomir Rintel wrote:
> It makes no sense to remove the device on shutdown. And it break things
> when the hardware crucial for shutdown (such as the embedded controller)
> is attached to the SPI bus.

Again, are you sure?

On some hardware (sharp zaurus, phones) it is good idea to shut down
hardware before poweroff, as they don't have embedded controller that
would cut the power.

Will this increase power consumption while "off" on such platforms?
									Pavel

> Cc: Daniel Mack <daniel@zonque.org>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
>  drivers/spi/spi-pxa2xx.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
> index 14f4ea59caff..b06f37fb29f6 100644
> --- a/drivers/spi/spi-pxa2xx.c
> +++ b/drivers/spi/spi-pxa2xx.c
> @@ -1764,14 +1764,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static void pxa2xx_spi_shutdown(struct platform_device *pdev)
> -{
> -	int status = 0;
> -
> -	if ((status = pxa2xx_spi_remove(pdev)) != 0)
> -		dev_err(&pdev->dev, "shutdown failed with %d\n", status);
> -}
> -
>  #ifdef CONFIG_PM_SLEEP
>  static int pxa2xx_spi_suspend(struct device *dev)
>  {
> @@ -1851,7 +1843,6 @@ static struct platform_driver driver = {
>  	},
>  	.probe = pxa2xx_spi_probe,
>  	.remove = pxa2xx_spi_remove,
> -	.shutdown = pxa2xx_spi_shutdown,
>  };
>  
>  static int __init pxa2xx_spi_init(void)

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

end of thread, other threads:[~2018-11-03 19:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 12:11 [PATCH] spi: pxa2xx: Remove the shutdown callback Lubomir Rintel
2018-09-17 21:34 ` Applied "spi: pxa2xx: Remove the shutdown callback" to the spi tree Mark Brown
2018-11-03 19:13 ` [PATCH] spi: pxa2xx: Remove the shutdown callback Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).