On 08/04/25 18:29, Heiko Schocher wrote:
Hello Aniket,
On 10.03.25 11:36, Aniket Limaye wrote:
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-lim...@ti.com>
---
v2:
- Use proper error codes in __omap24_i2c_xfer_msg()
- Use proper error prints to indicate omap24xx i2c driver
- Link to v1:
https://lore.kernel.org/u-boot/20250304220546.866602-2-a-lim...@ti.com/
---
drivers/i2c/omap24xx_i2c.c | 143 +++++++++++++++++++++++++++++++------
1 file changed, 123 insertions(+), 20 deletions(-)
This patch drops failures in CI, for example:
https://dev.azure.com/hs0298/hs/_build/results?buildId=174&view=logs&j=8d774156-03aa-5a8d-58c3-e707e7e6b7b9&t=9810a296-c5d9-5d86-70ea-69525d43e83a&l=661
https://dev.azure.com/hs0298/hs/_build/results?buildId=174&view=logs&j=b0438df5-671b-55ba-8fc5-1746d486c477&t=d9c340c5-b4ec-5d48-b218-d3f9f8f479f8&l=700
in clear text it is:
"""
+drivers/i2c/omap24xx_i2c.c:538:12: error: '__omap24_i2c_xfer_msg'
defined but not used [-Werror=unused-function]
"" >
Could you please send a fix?
Ahh, thanks for catching this.
Sent a v3:
https://lore.kernel.org/u-boot/20250422101957.1949448-1-a-lim...@ti.com/
Regards,
Aniket
Thanks in advance!
bye,
Heiko