Skip to content

Commit e8e590e

Browse files
XenuIsWatchingkartben
authored andcommitted
drivers: i3c: fix read flag for i3c_hdr_ddr_read
i3c_hdr_ddr_read is missing the I3C_MSG_READ. Add it. Signed-off-by: Ryan McClelland <[email protected]>
1 parent 3449e22 commit e8e590e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/zephyr/drivers/i3c/hdr_ddr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static inline int i3c_hdr_ddr_read(struct i3c_device_desc *target, uint8_t cmd,
7373

7474
msg.buf = buf;
7575
msg.len = num_bytes;
76-
msg.flags = I3C_MSG_STOP | I3C_MSG_HDR;
76+
msg.flags = I3C_MSG_READ | I3C_MSG_STOP | I3C_MSG_HDR;
7777
msg.hdr_mode = I3C_MSG_HDR_DDR;
7878
msg.hdr_cmd_code = cmd;
7979

@@ -90,10 +90,10 @@ static inline int i3c_hdr_ddr_read(struct i3c_device_desc *target, uint8_t cmd,
9090
* @param target I3C target device descriptor.
9191
* @param write_buf Pointer to the data to be written
9292
* @param num_write Number of bytes to write
93-
* @param write_cmd 7-bit command code for write
93+
* @param read_cmd 7-bit command code for read
9494
* @param read_buf Pointer to storage for read data
9595
* @param num_read Number of bytes to read
96-
* @param read_cmd 7-bit command code for read
96+
* @param write_cmd 7-bit command code for write
9797
*
9898
* @retval 0 if successful
9999
* @retval -EBUSY Bus is busy.

0 commit comments

Comments
 (0)