* [PATCH] i2c-imx: fix broken GPIO bus recovery due to missing recover_bus assignment
@ 2025-07-09 6:39 Jan-David Voelkel
2025-07-09 7:18 ` [EXT] " Carlos Song
0 siblings, 1 reply; 2+ messages in thread
From: Jan-David Voelkel @ 2025-07-09 6:39 UTC (permalink / raw)
To: Oleksij Rempel, Andi Shyti, Shawn Guo, Sascha Hauer
Cc: kernel, festevam, linux-i2c, imx, linux-arm-kernel, linux-kernel,
Janitawa
From: Janitawa <jan-david-voelkel@web.de>
The transition to generic GPIO recovery support removed the
driver-specific bus recovery logic but failed to assign the
required recover_bus callback. This prevented the core from enabling
recovery, effectively disabling the feature.
This commit restores the assignment to ensure proper recovery
initialization.
Signed-off-by: Janitawa <jan-david-voelkel@web.de>
---
drivers/i2c/busses/i2c-imx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index c5224d43eea4..421f6da61f00 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1375,6 +1375,8 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
if (IS_ERR(bri->pinctrl))
return PTR_ERR(bri->pinctrl);
+ bri->recover_bus = i2c_generic_scl_recovery;
+
i2c_imx->adapter.bus_recovery_info = bri;
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [EXT] [PATCH] i2c-imx: fix broken GPIO bus recovery due to missing recover_bus assignment
2025-07-09 6:39 [PATCH] i2c-imx: fix broken GPIO bus recovery due to missing recover_bus assignment Jan-David Voelkel
@ 2025-07-09 7:18 ` Carlos Song
0 siblings, 0 replies; 2+ messages in thread
From: Carlos Song @ 2025-07-09 7:18 UTC (permalink / raw)
To: Jan-David Voelkel, Oleksij Rempel, Andi Shyti, Shawn Guo,
Sascha Hauer
Cc: kernel@pengutronix.de, festevam@gmail.com,
linux-i2c@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Jan-David Voelkel <jan-david-voelkel@web.de>
> Sent: Wednesday, July 9, 2025 2:39 PM
> To: Oleksij Rempel <o.rempel@pengutronix.de>; Andi Shyti
> <andi.shyti@kernel.org>; Shawn Guo <shawnguo@kernel.org>; Sascha Hauer
> <s.hauer@pengutronix.de>
> Cc: kernel@pengutronix.de; festevam@gmail.com; linux-i2c@vger.kernel.org;
> imx@lists.linux.dev; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; Janitawa <jan-david-voelkel@web.de>
> Subject: [EXT] [PATCH] i2c-imx: fix broken GPIO bus recovery due to missing
> recover_bus assignment
>
> [You don't often get email from jan-david-voelkel@web.de. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
>
>
> From: Janitawa <jan-david-voelkel@web.de>
>
> The transition to generic GPIO recovery support removed the driver-specific bus
> recovery logic but failed to assign the required recover_bus callback. This
> prevented the core from enabling recovery, effectively disabling the feature.
>
> This commit restores the assignment to ensure proper recovery initialization.
>
> Signed-off-by: Janitawa <jan-david-voelkel@web.de>
> ---
> drivers/i2c/busses/i2c-imx.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index
> c5224d43eea4..421f6da61f00 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -1375,6 +1375,8 @@ static int i2c_imx_init_recovery_info(struct
> imx_i2c_struct *i2c_imx,
> if (IS_ERR(bri->pinctrl))
> return PTR_ERR(bri->pinctrl);
>
> + bri->recover_bus = i2c_generic_scl_recovery;
> +
> i2c_imx->adapter.bus_recovery_info = bri;
>
Hi,
Have you meet one issue on i2c-imx recovery function?
If bri->recover_bus is NULL and scl_gpios has been added at i2c node.
I notice i2c_generic_scl_recovery will be assigned to bri->recover_bus to help
I2c-imx can support gpio recovery.
Code path in i2c-core-base.c:
> bri->recover_bus = i2c_generic_scl_recovery;
> i2c_gpio_init_generic_recovery()
> i2c_gpio_init_recovery()
> i2c_init_recovery()
> i2c_register_adapter()
Carlos Song
> return 0;
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-09 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 6:39 [PATCH] i2c-imx: fix broken GPIO bus recovery due to missing recover_bus assignment Jan-David Voelkel
2025-07-09 7:18 ` [EXT] " Carlos Song
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).