[i2c, sw] Minor clean ups#687
Conversation
A reviewer on lowRISC#633 commented about inconsistency in the naming of tBUF timing parameter accross different places. That made me look at the name of the bus_free_time_cycles field in the i2c_timing_params_t struct and I realized that it is also inconsistent. Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Historically, it was there to clean up FMT FIFO since that part was missing during errors. That still kept in place at the start of read / write functions as a precautionary step. I think this is no longer needed since clean up is now done during errors in i2c_host_wait_transfer_finish(). Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
martin-velay
left a comment
There was a problem hiding this comment.
Thanks Kinza for this cleanup.
I'd only suggest to add a comment to tell the user of i2c.h that they must always call i2c_wait_transfer_finish after each i2c_write_bytes/i2c_read_bytes.
Other than that, I just ran the i2c_host_tx_rx and the associated _cheri test, and everything pass.
marnovandermaas
left a comment
There was a problem hiding this comment.
Looks good to me, please do verify that the I2C regressions still pass with the expected pass rate.
The only test needs checking is
There is a similar comment already exist here i2c.h#L121 |
No description provided.