Re: [PATCH v3 0/2] i2c: improve bus recovery for single-ended GPIOs

From: 李杰

Date: Wed Apr 22 2026 - 14:47:31 EST


Hi Wolfram,

I'm just gently pinging this patch series to see if you have any
further comments or if it's ready to be picked up for the I2C tree.

This v3 series already includes the Reviewed-by tags from Linus
Walleij for both patches.

Thanks for your time!

Best regards,
Jie Li

On Sun, Feb 1, 2026 at 12:18 PM Jie Li <lj29312931@xxxxxxxxx> wrote:
>
> Greetings,
>
> Apologies for the delay in responding.
>
> Thank you very much for your review and the specific guidance regarding
> the return types. I really appreciate your patience and time spent
> guiding me through my first contribution to the kernel.
>
> This series (v3) updates the helper function to use the 'bool' type as
> suggested and includes the Reviewed-by tags.
>
> This series addresses a limitation in the I2C bus recovery mechanism where
> certain open-drain GPIOs are incorrectly identified as input-only,
> preventing the recovery logic from functioning.
>
> Following the suggestion from Linus Walleij, this version drops the
> previously proposed "force-set-sda" DT property. Instead, it
> introduces a generic helper in the GPIO subsystem to identify
> single-ended configurations. This allows the I2C core to reliably
> enable recovery for open-drain lines regardless of the
> instantaneous hardware direction reporting.
>
> Changes in v3:
> - Patch 1:
> - Changed return type of gpiod_is_single_ended() from int to bool.
> - Updated return values from 0/1 to false/true.
> - Added Reviewed-by: Linus Walleij.
> - Patch 2:
> - Added Reviewed-by: Linus Walleij.
>
> Changes in v2:
> - Replaced DT-based "force-set-sda" with a gpiolib helper.
> - Added gpiod_is_single_ended() to drivers/gpio/gpiolib.c.
> - Updated i2c-core-base.c to use the new helper.
>
> Jie Li (2):
> gpiolib: add gpiod_is_single_ended() helper
> i2c: core: support recovery for single-ended GPIOs
>
> drivers/gpio/gpiolib.c | 22 ++++++++++++++++++++++
> drivers/i2c/i2c-core-base.c | 3 ++-
> include/linux/gpio/consumer.h | 5 +++++
> 3 files changed, 29 insertions(+), 1 deletion(-)
>
> --
> 2.43.0
>