i2c: mux: gpio: Add support for the 'settle-time-us' property
authorBastien Curutchet <bastien.curutchet@bootlin.com>
Mon, 17 Jun 2024 12:08:18 +0000 (14:08 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Sat, 20 Jul 2024 01:07:55 +0000 (03:07 +0200)
commit45b8ee7182d5ef8df6959297046f86dc128d6a06
tree26abb3582dff0e3d2bcda1df274491289629029d
parenta618d86d5a1cf1ac6edbbe0e2b29649afb3decf0
i2c: mux: gpio: Add support for the 'settle-time-us' property

Some hardware need some time to switch from a bus to another. This can
cause the first transfers following the selection of a bus to fail.
There is no way to configure this kind of waiting time in the driver.

Add support for the 'settle-time-us' device-tree property. When set,
the i2c_mux_gpio_select() applies a delay before returning, leaving
enough time to the hardware to switch to the new bus.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/muxes/i2c-mux-gpio.c
include/linux/platform_data/i2c-mux-gpio.h