sonic-net / sonic-net/sonic-linux-kernel
Problems encountered by i2c-gpio drivers
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 72
- Forks
- 237
- Avg merge
- 7d 19h
- Merged PRs (30d)
- 8
Description
Code Path:drivers/i2c/algos/i2c-algo-bit.c
Issue 1:An occasional I2C deadlock (SCL is high voltage level and SDA is low voltage level) cannot be recovered, making the I2C controller unusable.
Issue 2:Insert a faulty optical module with SDA and GND short-circuited, the I2C GPIO controller cannot identify the exception, and all the data read is 0 (The access is successful from the I2C protocol)
Regarding this issue, our solution is:
Issue1:The solution is the same as the i2c-i801 driver, which also imports 9 clock unlock functions
Issue2:Add I2C-GPIO voltage level detection to determine SCL and SDA voltage levels before I2C begins transmission. If the SCL and SDA voltage levels are not high at the same time, a failure is returned.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with drivers/i2c/algos/i2c-algo-bit.c and trace the i2c-gpio transfer path. Compare the requested nine-clock recovery behavior with i2c-i801, then inspect how SCL and SDA levels can be checked before transmission. Done means the deadlock can recover and a low SCL or SDA level returns a failure instead of accepting zero-valued data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100