summaryrefslogtreecommitdiff
path: root/drivers/i2c/mtk_i2c.c
diff options
context:
space:
mode:
authorAniket Limaye <a-limaye@ti.com>2025-04-22 15:49:50 +0530
committerHeiko Schocher <hs@denx.de>2025-04-22 13:03:37 +0200
commit520b57ee4763a81a165eabf700a585ae67d79aa7 (patch)
tree1c8f43646b34d669c150cc2f20a16d714da10d7d /drivers/i2c/mtk_i2c.c
parent640f9f33a17ad799d63a8b6f44ce494193d64656 (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 <a-limaye@ti.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c/mtk_i2c.c')
0 files changed, 0 insertions, 0 deletions