Skip to content

I2C combined transactions broken #607

Closed

Description

With the new combined transactions for the I2C controller introduced with commit a5ca1aa, i2c read operations return incorrect results:
See this example:

sudo i2cget -y 1 0x3b 0
0x11
sudo i2cget -y 1 0x3b 0
0x88
sudo i2cget -y 1 0x3b 0
0x05

The register 0 always contained the value "0x05", but the correct value had been returned only on the third read operation. I have check the I2C communication with the scope, the device returned 0x05 on all 3 read operations.

With combined transactions disabled by default after commit b9a86b0, I2C reads are working again.

The bug must therefore be in the combined transaction code. This should be fixed as enabling these combined transactions might break support for lots of I2C devices. I can confirm that this problem broke the HiFiBerry Digi/wm8804 driver.

If needed, I can provide test hardware to the developer, but I guess, the same issue happens with other I2C devices too.

Activity

  1. popcornmix commented on May 31, 2014

    @popcornmix
    Collaborator

    I'm not understanding the problem.
    By default combined transactions are disbabled, and so everything works, correct?

  2. popcornmix commented on May 31, 2014

    @popcornmix
    Collaborator

    Some use cases benefit from enabling the combined transactions so I see no necessity to remove that as an option.

  3. popcornmix commented on May 31, 2014

    @popcornmix
    Collaborator

    Ideal behaviour is that the combined=1 module parameter is removed and it works with all devices (utilising combined transaction where possible).

    But I don't know much about I2C or this driver so would appreciate any fixes that improve the behaviour.

  4. popcornmix commented on Jun 29, 2014

    @popcornmix
    Collaborator

    Closing as default behaviour works. Optional behaviour should be avoided if it causes problems.
    Please submit a pull request if you have a way of improving behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions