diff options
| author | Aniket Limaye <[email protected]> | 2025-04-22 15:49:50 +0530 |
|---|---|---|
| committer | Heiko Schocher <[email protected]> | 2025-04-22 13:03:37 +0200 |
| commit | 520b57ee4763a81a165eabf700a585ae67d79aa7 (patch) | |
| tree | 1c8f43646b34d669c150cc2f20a16d714da10d7d /include/linux/linux_string.h | |
| parent | 640f9f33a17ad799d63a8b6f44ce494193d64656 (diff) | |
i2c: omap24xx_i2c: Use new function __omap24_i2c_xfer_msg()
Remove __omap24_i2c_read/write() usage from omap_i2c_xfer() in favour of
the more flexible __omap24_i2c_xfer_msg().
Consequently, these are also no longer needed when DM_I2C is enabled.
New function __omap24_i2c_xfer_msg() will take care of individual read
OR write transfers with a target device. It goes through below sequence:
- Program the provided Target Chip address (OMAP_I2C_SA_REG)
- Program the provided Data len (OMAP_I2C_CNT_REG)
- Program the provided Control register flags (OMAP_I2C_CON_REG)
- Read from or Write to the provided Data buffer (OMAP_I2C_DATA_REG)
For a detailed programming guide, refer to the TRM[0] (12.1.3.4 I2C
Programming Guide).
This patch by itself should be a transparent change. However this is
needed for implementing a proper Repeated Start (Sr) functionality for
i2c_msgs.
Previous implementation for omap_i2c_xfer called __omap24_i2c_read/write
functions, with hardcoded addr=0 and alen=0 for each i2c_msg. Each of
these calls would program the registers always with a Stop bit set, not
allowing for a repeated start between i2c_msgs in the same xfer().
[0]: https://www.ti.com/lit/zip/spruj28 (TRM)
Signed-off-by: Aniket Limaye <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'include/linux/linux_string.h')
0 files changed, 0 insertions, 0 deletions
