From: Mark Brown <broonie@kernel.org> To: Phil Edworthy <phil.edworthy@renesas.com> Cc: Gareth Williams <gareth.williams.jx@renesas.com>, Geert Uytterhoeven <geert@linux-m68k.org>, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org> Subject: Applied "spi: dw: Add basic runtime PM support" to the spi tree Date: Tue, 1 Oct 2019 12:41:07 +0100 (BST) [thread overview] Message-ID: <20191001114107.79E5727429C0@ypsilon.sirena.org.uk> (raw) In-Reply-To: <1568793876-9009-4-git-send-email-gareth.williams.jx@renesas.com> The patch spi: dw: Add basic runtime PM support has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.5 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 1e695983251029dc0b0fc516290077539df400ff Mon Sep 17 00:00:00 2001 From: Phil Edworthy <phil.edworthy@renesas.com> Date: Wed, 18 Sep 2019 09:04:35 +0100 Subject: [PATCH] spi: dw: Add basic runtime PM support Enable runtime PM so that the clock used to access the registers in the peripheral is turned on using a clock domain. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Gareth Williams <gareth.williams.jx@renesas.com> Link: https://lore.kernel.org/r/1568793876-9009-4-git-send-email-gareth.williams.jx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> --- drivers/spi/spi-dw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 9a49e073e8b7..54ed6eb3e252 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -10,6 +10,7 @@ #include <linux/module.h> #include <linux/highmem.h> #include <linux/delay.h> +#include <linux/pm_runtime.h> #include <linux/slab.h> #include <linux/spi/spi.h> @@ -493,10 +494,13 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) master->dev.of_node = dev->of_node; master->dev.fwnode = dev->fwnode; master->flags = SPI_MASTER_GPIO_SS; + master->auto_runtime_pm = true; if (dws->set_cs) master->set_cs = dws->set_cs; + pm_runtime_enable(dev); + /* Basic HW init */ spi_hw_init(dev, dws); @@ -525,6 +529,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) spi_enable_chip(dws, 0); free_irq(dws->irq, master); err_free_master: + pm_runtime_disable(dev); spi_controller_put(master); return ret; } @@ -539,6 +544,9 @@ void dw_spi_remove_host(struct dw_spi *dws) spi_shutdown_chip(dws); + if (dws->master) + pm_runtime_disable(&dws->master->dev); + free_irq(dws->irq, dws->master); } EXPORT_SYMBOL_GPL(dw_spi_remove_host); -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org> To: Phil Edworthy <phil.edworthy@renesas.com> Cc: Gareth Williams <gareth.williams.jx@renesas.com>, Geert Uytterhoeven <geert@linux-m68k.org>, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org> Subject: Applied "spi: dw: Add basic runtime PM support" to the spi tree Date: Tue, 1 Oct 2019 12:41:07 +0100 (BST) [thread overview] Message-ID: <20191001114107.79E5727429C0@ypsilon.sirena.org.uk> (raw) In-Reply-To: <1568793876-9009-4-git-send-email-gareth.williams.jx@renesas.com> The patch spi: dw: Add basic runtime PM support has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.5 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 1e695983251029dc0b0fc516290077539df400ff Mon Sep 17 00:00:00 2001 From: Phil Edworthy <phil.edworthy@renesas.com> Date: Wed, 18 Sep 2019 09:04:35 +0100 Subject: [PATCH] spi: dw: Add basic runtime PM support Enable runtime PM so that the clock used to access the registers in the peripheral is turned on using a clock domain. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Gareth Williams <gareth.williams.jx@renesas.com> Link: https://lore.kernel.org/r/1568793876-9009-4-git-send-email-gareth.williams.jx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> --- drivers/spi/spi-dw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 9a49e073e8b7..54ed6eb3e252 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -10,6 +10,7 @@ #include <linux/module.h> #include <linux/highmem.h> #include <linux/delay.h> +#include <linux/pm_runtime.h> #include <linux/slab.h> #include <linux/spi/spi.h> @@ -493,10 +494,13 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) master->dev.of_node = dev->of_node; master->dev.fwnode = dev->fwnode; master->flags = SPI_MASTER_GPIO_SS; + master->auto_runtime_pm = true; if (dws->set_cs) master->set_cs = dws->set_cs; + pm_runtime_enable(dev); + /* Basic HW init */ spi_hw_init(dev, dws); @@ -525,6 +529,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) spi_enable_chip(dws, 0); free_irq(dws->irq, master); err_free_master: + pm_runtime_disable(dev); spi_controller_put(master); return ret; } @@ -539,6 +544,9 @@ void dw_spi_remove_host(struct dw_spi *dws) spi_shutdown_chip(dws); + if (dws->master) + pm_runtime_disable(&dws->master->dev); + free_irq(dws->irq, dws->master); } EXPORT_SYMBOL_GPL(dw_spi_remove_host); -- 2.20.1
next prev parent reply other threads:[~2019-10-01 11:41 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-18 8:04 [PATCH v2 0/4] spi: dw: Add basic runtime PM support Gareth Williams 2019-09-18 8:04 ` [PATCH v2 1/4] dt: spi: Add Renesas RZ/N1 binding documentation Gareth Williams 2019-10-01 11:41 ` Applied "dt: spi: Add Renesas RZ/N1 binding documentation" to the spi tree Mark Brown 2019-10-01 11:41 ` Mark Brown 2019-10-01 11:43 ` [PATCH v2 1/4] dt: spi: Add Renesas RZ/N1 binding documentation Rob Herring 2019-10-01 11:43 ` Rob Herring 2019-09-18 8:04 ` [PATCH v2 2/4] dt-bindings: snps,dw-apb-ssi: Add optional clock domain information Gareth Williams 2019-10-01 11:41 ` Applied "dt-bindings: snps,dw-apb-ssi: Add optional clock domain information" to the spi tree Mark Brown 2019-10-01 11:41 ` Mark Brown 2019-10-01 12:02 ` [PATCH v2 2/4] dt-bindings: snps,dw-apb-ssi: Add optional clock domain information Rob Herring 2019-10-01 13:50 ` Gareth Williams 2019-10-01 14:51 ` Geert Uytterhoeven 2019-09-18 8:04 ` [PATCH v2 3/4] spi: dw: Add basic runtime PM support Gareth Williams 2019-10-01 11:41 ` Mark Brown [this message] 2019-10-01 11:41 ` Applied "spi: dw: Add basic runtime PM support" to the spi tree Mark Brown 2019-09-18 8:04 ` [PATCH v2 4/4] spi: dw: Add compatible string for Renesas RZ/N1 SPI Controller Gareth Williams 2019-10-01 11:41 ` Applied "spi: dw: Add compatible string for Renesas RZ/N1 SPI Controller" to the spi tree Mark Brown 2019-10-01 11:41 ` Mark Brown 2019-09-19 13:31 ` [PATCH v2 0/4] spi: dw: Add basic runtime PM support Mark Brown 2019-09-19 15:14 ` Gareth Williams 2019-09-19 15:23 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191001114107.79E5727429C0@ypsilon.sirena.org.uk \ --to=broonie@kernel.org \ --cc=gareth.williams.jx@renesas.com \ --cc=geert@linux-m68k.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=phil.edworthy@renesas.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.