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
19 * position19 * position
20 * @n_values: Number of multiplexer positions (busses to instantiate)20 * @n_values: Number of multiplexer positions (busses to instantiate)
21 * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used21 * @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
22 */23 */
23struct i2c_mux_gpio_platform_data {24struct i2c_mux_gpio_platform_data {
24 int parent;25 int parent;
@@ -26,6 +27,7 @@ struct i2c_mux_gpio_platform_data { · 1 unmodified line
26 const unsigned *values;27 const unsigned *values;
27 int n_values;28 int n_values;
28 unsigned idle;29 unsigned idle;
30 u32 settle_time;
29};31};
30 32
31#endif /* _LINUX_I2C_MUX_GPIO_H */33#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