projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7d73cb
)
spi: bcm2835: Implement shutdown callback
author
Florian Fainelli
<f.fainelli@gmail.com>
Thu, 28 May 2020 19:06:05 +0000
(12:06 -0700)
committer
Mark Brown
<broonie@kernel.org>
Fri, 29 May 2020 16:49:53 +0000
(17:49 +0100)
Make sure we clear the FIFOs, stop the block, disable the clock and
release the DMA channel.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link:
https://lore.kernel.org/r/20200528190605.24850-1-f.fainelli@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm2835.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-bcm2835.c
b/drivers/spi/spi-bcm2835.c
index 20d8581fdf887373f4d07e1d6d1eb1625c70d5be..237bd306c26853aa3ba6f1c402455ea9cd18a4dc 100644
(file)
--- a/
drivers/spi/spi-bcm2835.c
+++ b/
drivers/spi/spi-bcm2835.c
@@
-1391,6
+1391,15
@@
static int bcm2835_spi_remove(struct platform_device *pdev)
return 0;
}
+static void bcm2835_spi_shutdown(struct platform_device *pdev)
+{
+ int ret;
+
+ ret = bcm2835_spi_remove(pdev);
+ if (ret)
+ dev_err(&pdev->dev, "failed to shutdown\n");
+}
+
static const struct of_device_id bcm2835_spi_match[] = {
{ .compatible = "brcm,bcm2835-spi", },
{}
@@
-1404,6
+1413,7
@@
static struct platform_driver bcm2835_spi_driver = {
},
.probe = bcm2835_spi_probe,
.remove = bcm2835_spi_remove,
+ .shutdown = bcm2835_spi_shutdown,
};
module_platform_driver(bcm2835_spi_driver);