On Wed, Oct 26, 2016 at 04:20:57PM +0700, Tin Huynh wrote: > We need to set stop bit if three conditions are true : The latest > bytes , the latest msg_write_ids and after receiving the buffer length. > If we use i2c_dw_xfer_need_stop , arguments of function are complex. OK, so you would need to pass dev and buf_len to that. > Can i use i2c_dw_xfer_receive_length() function ? > Thank you and best regards > Tin > if (dev->msg_write_idx == dev->msgs_num - 1 && > - buf_len == 1) > + buf_len == 1 && !(flags & I2C_M_RECV_LEN)) > cmd |= BIT(9); Maybe it is better if you just do it like the above then. -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html