Skip to contentSkip to conversation

i3c: fix I3C_SDR bit number

PATCH In review [email protected] 2 participants 4 messages Dec 2, 2025 I3C

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/2 i3c: fix I3C_SDR bit number

From: Alexandre Belloni <[email protected]>

0x31 is decimal 49 and doesn't fit in a 32 bit integer, switch to the intended decimal 31.

---
 include/linux/i3c/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/i3c/device.h +1 -1
index ae0662d9d77e..9fcb6410a584 100644
@@ -51,7 +51,7 @@ enum i3c_xfer_mode {
 	I3C_HDR_TSP = 1,
 	I3C_HDR_TSL = 2,
 	/* Use for default SDR transfer mode */
-	I3C_SDR = 0x31,
+	I3C_SDR = 31,
 };
 
 /**
Signature · 1 line
2.52.0
author maintainer
#1 lore raw

PATCH 2/2 i3c: document i3c_xfers

From: Alexandre Belloni <[email protected]>

i3c_xfers was left undocumented, document it.

---
 include/linux/i3c/master.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/linux/i3c/master.h +5 -1
index d0d5b3a9049f..2fd850f4678b 100644
@@ -418,7 +418,11 @@ struct i3c_bus {
  * @send_ccc_cmd: send a CCC command
  *		  This method is mandatory.
  * @priv_xfers: do one or several private I3C SDR transfers
- *		This method is mandatory.
+ *		This method is mandatory when i3c_xfers is not implemented. It
+ *		is deprecated.
+ * @i3c_xfers: do one or several I3C SDR or HDR transfers
+ *	       This method is mandatory when priv_xfers is not implemented but
+ *	       should be implemented instead of priv_xfers.
  * @attach_i2c_dev: called every time an I2C device is attached to the bus.
  *		    This is a good place to attach master controller specific
  *		    data to I2C devices.
Signature · 1 line
2.52.0
reviewer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] i3c: document i3c_xfers

Quoted 7 lines · On Tue, Dec 02, 2025 at 04:38:03PM +0100, [email protected] wrote:

From: Alexandre Belloni <[email protected]>

i3c_xfers was left undocumented, document it.

---

Quoted 23 lines
 include/linux/i3c/master.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/linux/i3c/master.h +5 -2
index d0d5b3a9049f..2fd850f4678b 100644
@@ -418,7 +418,11 @@ struct i3c_bus {
  * @send_ccc_cmd: send a CCC command
  *		  This method is mandatory.
  * @priv_xfers: do one or several private I3C SDR transfers
- *		This method is mandatory.
+ *		This method is mandatory when i3c_xfers is not implemented. It
+ *		is deprecated.
+ * @i3c_xfers: do one or several I3C SDR or HDR transfers
+ *	       This method is mandatory when priv_xfers is not implemented but
+ *	       should be implemented instead of priv_xfers.
  * @attach_i2c_dev: called every time an I2C device is attached to the bus.
  *		    This is a good place to attach master controller specific
  *		    data to I2C devices.
--

2.52.0

reviewer Reviewed-by on v1 1/2
#3 lore raw
In reply to [email protected]
Quoted 11 lines · On Tue, Dec 02, 2025 at 04:38:02PM +0100, [email protected] wrote:

From: Alexandre Belloni <[email protected]>

0x31 is decimal 49 and doesn't fit in a 32 bit integer, switch to the intended decimal 31.

---

Thanks.

Quoted 19 lines
 include/linux/i3c/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/i3c/device.h +1 -2
index ae0662d9d77e..9fcb6410a584 100644
@@ -51,7 +51,7 @@ enum i3c_xfer_mode {
 	I3C_HDR_TSP = 1,
 	I3C_HDR_TSL = 2,
 	/* Use for default SDR transfer mode */
-	I3C_SDR = 0x31,
+	I3C_SDR = 31,
 };
 
 /**
--

2.52.0