History

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.

Bastien Curutchet committed 2 years ago

Commit 45b8ee71 parent a618d862 files · +8 −0Browse files

Showing the changes to include/linux/platform_data (1 of 2 files). Show all

Unified · Split

include/linux/platform_data/i2c-mux-gpio.h+2−0
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 * position
2020 * @n_values: Number of multiplexer positions (busses to instantiate)
2121 * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
22+ * @settle_time: Delay to wait when a new bus is selected
2223 */
2324 struct i2c_mux_gpio_platform_data {
2425 int parent;
@@ -26,6 +27,7 @@ struct i2c_mux_gpio_platform_data { · 1 unmodified line
2627 const unsigned *values;
2728 int n_values;
2829 unsigned idle;
30+ u32 settle_time;
2931 };
3032
3133 #endif /* _LINUX_I2C_MUX_GPIO_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t