diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-26 07:10:03 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-26 07:10:03 -1000 |
| commit | 25e7ab89f4774b0f842cee0e8a20c11f755924d5 (patch) | |
| tree | b4a86bacf6a33561091805f8e49ddb812fe5173c /include/linux | |
| parent | 0cc3ad8f4d2e2009c2005278c754caf7c07fe0a4 (diff) | |
| parent | f7b70efba26963bf725f10574cc071f86cd5ee1d (diff) | |
Merge tag 'i2c-7.4-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux
Pull more i2c updates from Andi Shyti:
"This introduces dynamic transfer timeouts in the I2C core, already
used by qcom-geni. Alongside some driver improvements and fixes, it
also brings in the Rust I2C pull request.
Core:
- core, qcom-geni: add and use a dynamic timeout helper
- acpi: fix adapter reference leak when creating I2C clients
Drivers:
- imx: support reversed address direction and no-start transfers
- designware: queue block data reads once length is known
- mt7621: skip the second data register for chunks up to 4 bytes
- sh_mobile: ensure IRQs are freed before unmapping registers
Rust:
- Remove unsound device-to-client reference conversion"
* tag 'i2c-7.4-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux:
i2c: sh_mobile: request IRQs after mapping registers
i2c: imx: add I2C_M_REV_DIR_ADDR and I2C_M_NOSTART
i2c: mt7621: fix copying uninitialized kernel stack with reduced page_len
i2c: designware: queue only one read command for block reads
i2c: acpi: Fix adapter reference leak in i2c_acpi_new_device_by_fwnode()
i2c: qcom-geni: Add dynamic transfer timeout based on transfer length and frequency
i2c: core: Add i2c_update_timeout() helper for dynamic transfer timeouts
rust: i2c: remove TryFrom<&Device> implementation for &I2cClient
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i2c.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index f3192ab1982e..6a847fc88d25 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -757,6 +757,9 @@ struct i2c_adapter { struct rt_mutex mux_lock; int timeout; /* in jiffies */ +#ifdef CONFIG_I2C_DYNAMIC_TIMEOUT + int user_timeout; /* I2C_TIMEOUT ioctl value in jiffies */ +#endif int retries; struct device dev; /* the adapter device */ unsigned long locked_flags; /* owned by the I2C core */ @@ -928,6 +931,16 @@ unsigned int i2c_adapter_depth(struct i2c_adapter *adapter); void i2c_parse_fw_timings(struct device *dev, struct i2c_timings *t, bool use_defaults); +#ifdef CONFIG_I2C_DYNAMIC_TIMEOUT +void i2c_update_timeout(struct i2c_adapter *adap, u32 bus_freq_hz, + size_t len, unsigned int safety_coeff, + unsigned int min_usec); +#else +static inline void i2c_update_timeout(struct i2c_adapter *adap, u32 bus_freq_hz, + size_t len, unsigned int safety_coeff, + unsigned int min_usec) {} +#endif + /* Return the functionality mask */ static inline u32 i2c_get_functionality(struct i2c_adapter *adap) { |
