Skip to contentSkip to conversation

i2c: Clarify behavior of I2C_M_RD flag

PATCH Superseded Viswanath 2 participants 7 messages May 10, 2025 – Jul 14, 2025

Subsystems (2)
lore
Share & tools
lore

Viswanath

author
#0 lore raw

PATCH v2 1/1 i2c: Clarify behavior of I2C_M_RD flag

Update the description of I2C_M_RD to clarify that not setting it signals a write transaction

---
 include/uapi/linux/i2c.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/linux/i2c.h +2 -1
index aa751389de07..29b149ca4b70 100644
@@ -21,7 +21,8 @@
  *
  * @flags:
  *   Supported by all adapters:
- *   %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001!
+ *   %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001! If
+ *   not set, the transaction is interpreted as write.
  *
  *   Optional:
  *   %I2C_M_DMA_SAFE: the buffer of this message is DMA safe. Makes sense only
Signature · 1 line
2.49.0
#1 lore raw
Quoted 2 lines · Viswanath

Update the description of I2C_M_RD to clarify that not setting it signals a write transaction

Well, ok, if one is new to I2C this might help understanding.

Quoted 1 line

Can you please sign with your full name and resend?

#2 lore raw

Hi Wolfram,

Updated the Signed-off-by line with my full legal name, as requested.

Thanks,
I Viswanath

#3 lore raw

PATCH v3 1/1 i2c: Clarify behavior of I2C_M_RD flag

Update the description of I2C_M_RD to clarify that not setting it signals a write transaction

---
 include/uapi/linux/i2c.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/linux/i2c.h +2 -1
index 92326ebde350..a2db2a56c8b0 100644
@@ -21,7 +21,8 @@
  *
  * @flags:
  *   Supported by all adapters:
- *   %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001!
+ *   %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001! If
+ *   not set, the transaction is interpreted as write.
  *
  *   Optional:
  *   %I2C_M_DMA_SAFE: the buffer of this message is DMA safe. Makes only sense
Signature · 1 line
2.49.0
#4 lore raw
In reply to Wolfram Sang

Apologies, resending my previous reply with a proper subject line.

Hi Wolfram,

Updated the Signed-off-by line with my full legal name, as requested.

Thanks,
I Viswanath

#5 lore raw

PATCH v3 1/1 i2c: Clarify behavior of I2C_M_RD flag

Update the description of I2C_M_RD to clarify that not setting it signals a write transaction

---
 include/uapi/linux/i2c.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/linux/i2c.h +2 -1
index 92326ebde350..a2db2a56c8b0 100644
@@ -21,7 +21,8 @@
  *
  * @flags:
  *   Supported by all adapters:
- *   %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001!
+ *   %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001! If
+ *   not set, the transaction is interpreted as write.
  *
  *   Optional:
  *   %I2C_M_DMA_SAFE: the buffer of this message is DMA safe. Makes only sense
Signature · 1 line
2.49.0