Skip to content

i2c: Add work-around to make i2c scan work#73

Merged
kwd-doodling merged 1 commit intomainfrom
dwang4_i2c_scan_wa
Feb 3, 2026
Merged

i2c: Add work-around to make i2c scan work#73
kwd-doodling merged 1 commit intomainfrom
dwang4_i2c_scan_wa

Conversation

@kwd-doodling
Copy link
Contributor

The I2C HW cannot support 0-byte transfer as I2C scan requests. Send one dummy byte for I2C scan to make it work.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements a workaround for I2C hardware that cannot perform 0-byte transfers, which are typically requested during I2C device scanning. When a scan operation is detected (0-byte transfer with non-NULL data pointer), the driver now sends a single dummy byte instead.

Changes:

  • Modified parameter validation to allow 0-byte transfers when data pointer is non-NULL
  • Added logic to override buffer size to 1 byte for I2C scan operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The I2C HW cannot support 0-byte transfer as I2C scan requests. Send one dummy
byte for I2C scan to make it work.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kwd-doodling kwd-doodling merged commit ffa1e54 into main Feb 3, 2026
5 checks passed
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.

2 participants