i2c: imx: Make SDA actually optional for bus recovering
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Thu, 30 Nov 2023 09:57:51 +0000 (10:57 +0100)
committerWolfram Sang <wsa@kernel.org>
Thu, 18 Jan 2024 20:10:42 +0000 (21:10 +0100)
commitdb63eacdf61d6bbcde783f15aaafbd8e66476e9a
tree8d1b84018a2f7594a73e6d5545ffb5e5a1e94e8c
parent13e3a512a29001cab68fe9a0c12be94e6d42a10c
i2c: imx: Make SDA actually optional for bus recovering

Both i2c_generic_scl_recovery() and the debug output indicate that SDA is
purely optional for bus recovery. But devm_gpiod_get() never returns NULL
making it mandatory. Fix this by calling devm_gpiod_get_optional instead.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-imx.c