diff options
author | Bastien Curutchet <bastien.curutchet@bootlin.com> | 2024-06-17 15:08:18 +0300 |
---|---|---|
committer | Andi Shyti <andi.shyti@kernel.org> | 2024-07-20 04:07:55 +0300 |
commit | 45b8ee7182d5ef8df6959297046f86dc128d6a06 (patch) | |
tree | 26abb3582dff0e3d2bcda1df274491289629029d /include/linux/platform_data | |
parent | a618d86d5a1cf1ac6edbbe0e2b29649afb3decf0 (diff) | |
download | linux-45b8ee7182d5ef8df6959297046f86dc128d6a06.tar.xz |
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>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/i2c-mux-gpio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/platform_data/i2c-mux-gpio.h b/include/linux/platform_data/i2c-mux-gpio.h index 816a4cd3ccb5..96843aab4d1e 100644 --- a/include/linux/platform_data/i2c-mux-gpio.h +++ b/include/linux/platform_data/i2c-mux-gpio.h @@ -19,6 +19,7 @@ * position * @n_values: Number of multiplexer positions (busses to instantiate) * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used + * @settle_time: Delay to wait when a new bus is selected */ struct i2c_mux_gpio_platform_data { int parent; @@ -26,6 +27,7 @@ struct i2c_mux_gpio_platform_data { const unsigned *values; int n_values; unsigned idle; + u32 settle_time; }; #endif /* _LINUX_I2C_MUX_GPIO_H */ |