* [PATCH v3] i2c: imx: switch different pinctrl state in different system power status
@ 2024-12-23 3:43 Carlos Song
2024-12-23 6:24 ` Oleksij Rempel
2024-12-25 22:52 ` Andi Shyti
0 siblings, 2 replies; 3+ messages in thread
From: Carlos Song @ 2024-12-23 3:43 UTC (permalink / raw)
To: o.rempel, kernel, andi.shyti, shawnguo, s.hauer, festevam
Cc: linux-i2c, imx, linux-arm-kernel, linux-kernel, Carlos Song,
Frank Li
Switch different pinctrl state in different system power status.
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
Change fot V3:
- According to Oleksij's comment, return values for
pinctrl_setect_state.
Change for V2:
- Add Frank reviewed-by. No code change.
---
drivers/i2c/busses/i2c-imx.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 6fb496a92817..d0cfb8eac580 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1869,8 +1869,7 @@ static int i2c_imx_runtime_suspend(struct device *dev)
struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev);
clk_disable(i2c_imx->clk);
-
- return 0;
+ return pinctrl_pm_select_sleep_state(dev);
}
static int i2c_imx_runtime_resume(struct device *dev)
@@ -1878,6 +1877,10 @@ static int i2c_imx_runtime_resume(struct device *dev)
struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev);
int ret;
+ ret = pinctrl_pm_select_default_state(dev);
+ if (ret)
+ return ret;
+
ret = clk_enable(i2c_imx->clk);
if (ret)
dev_err(dev, "can't enable I2C clock, ret=%d\n", ret);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] i2c: imx: switch different pinctrl state in different system power status
2024-12-23 3:43 [PATCH v3] i2c: imx: switch different pinctrl state in different system power status Carlos Song
@ 2024-12-23 6:24 ` Oleksij Rempel
2024-12-25 22:52 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2024-12-23 6:24 UTC (permalink / raw)
To: Carlos Song
Cc: kernel, andi.shyti, shawnguo, s.hauer, festevam, linux-i2c, imx,
linux-arm-kernel, linux-kernel, Frank Li
On Mon, Dec 23, 2024 at 11:43:43AM +0800, Carlos Song wrote:
> Switch different pinctrl state in different system power status.
>
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Thank you!
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] i2c: imx: switch different pinctrl state in different system power status
2024-12-23 3:43 [PATCH v3] i2c: imx: switch different pinctrl state in different system power status Carlos Song
2024-12-23 6:24 ` Oleksij Rempel
@ 2024-12-25 22:52 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Andi Shyti @ 2024-12-25 22:52 UTC (permalink / raw)
To: Carlos Song
Cc: o.rempel, kernel, shawnguo, s.hauer, festevam, linux-i2c, imx,
linux-arm-kernel, linux-kernel, Frank Li
Hi Carlos,
On Mon, Dec 23, 2024 at 11:43:43AM +0800, Carlos Song wrote:
> Switch different pinctrl state in different system power status.
>
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
merged to i2c/i2c-host.
Thanks,
Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-25 22:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-23 3:43 [PATCH v3] i2c: imx: switch different pinctrl state in different system power status Carlos Song
2024-12-23 6:24 ` Oleksij Rempel
2024-12-25 22:52 ` Andi Shyti
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).