Hi all, On Sun, Feb 01, 2026 at 12:18:12PM +0100, Jie Li wrote: > Currently, i2c_init_recovery() only assigns the set_sda/set_scl > hooks if gpiod_get_direction() returns 0 (output). > > This logic fails on certain SoC controllers where open-drain lines > in a high-impedance state are physically reported as inputs. This > leads to a "deadlock" where the I2C core refuses to assign the > recovery hooks because it incorrectly assumes the pins are > input-only, even though they are fully capable of driving the bus > low for recovery. > > Update the recovery initialization to use the new > gpiod_is_single_ended() helper. If a GPIO is configured as > open-drain or open-source in the firmware, it is safe to assume > it can be used for bus recovery, even if the current hardware > direction is reported as input. > > Signed-off-by: Jie Li > Reviewed-by: Linus Walleij I think this should go via the GPIO tree? If so: Acked-by: Wolfram Sang This probably needs a respin, though, because I will push out a patch today which will use the new GPIO_LINE_DIRECTION_OUT macro instead of 0. Thanks and happy hacking, Wolfram