Message ID | 20240108120802.7601-1-zhouruihai@huaqin.corp-partner.google.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4247d7f2ca564bbede54054da1f35a359bb061bd |
Headers | show |
Series | spi: spi-mt65xx: Support sleep pin control | expand |
On Mon, 08 Jan 2024 20:08:02 +0800, Ruihai Zhou wrote: > Supports configuring sleep pin control during system suspend to prevent > potential power leakage and additional power consumption. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: spi-mt65xx: Support sleep pin control commit: 4247d7f2ca564bbede54054da1f35a359bb061bd 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
diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 8d5d170d49cc..8d4633b353ee 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@ -13,6 +13,7 @@ #include <linux/module.h> #include <linux/of.h> #include <linux/gpio/consumer.h> +#include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> #include <linux/platform_data/spi-mt65xx.h> #include <linux/pm_runtime.h> @@ -1316,6 +1317,8 @@ static int mtk_spi_suspend(struct device *dev) clk_disable_unprepare(mdata->spi_hclk); } + pinctrl_pm_select_sleep_state(dev); + return 0; } @@ -1325,6 +1328,8 @@ static int mtk_spi_resume(struct device *dev) struct spi_controller *host = dev_get_drvdata(dev); struct mtk_spi *mdata = spi_controller_get_devdata(host); + pinctrl_pm_select_default_state(dev); + if (!pm_runtime_suspended(dev)) { ret = clk_prepare_enable(mdata->spi_clk); if (ret < 0) {
Supports configuring sleep pin control during system suspend to prevent potential power leakage and additional power consumption. Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> --- drivers/spi/spi-mt65xx.c | 5 +++++ 1 file changed, 5 insertions(+)