Skip to content

I2C SW cleanups#605

Open
KinzaQamar wants to merge 4 commits into
lowRISC:mainfrom
KinzaQamar:i2c_sw_cleanups
Open

I2C SW cleanups#605
KinzaQamar wants to merge 4 commits into
lowRISC:mainfrom
KinzaQamar:i2c_sw_cleanups

Conversation

@KinzaQamar
Copy link
Copy Markdown
Contributor

@KinzaQamar KinzaQamar commented Jun 7, 2026

Apart from 38ec242, every commit is addressing review comments in #473

compute_timing_parameters() is only used by i2c_init().

Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Now that we are chip level I2C Host/Device tests, renaming existing
i2c/smoketest with the functionality of the test seems reasonable.

Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
The only difference b/w them was that i2c_wait_read_finish() wasn't checking
cmd_complete field of the intr_state register. In host mode, this interrupt
is raised if the host issues a repeated START or terminates the transaction
by issuing STOP. But OT's programming guide doesn't say anything about
checking that field in case of a read transfer. I think it is better to
check that field in case of Reads as it basically means that the transfer is
completed.

This also reduce the need of having 2 separate functions with just a difference
of not checking cmd_complete field of the intr_state register.

Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant