[PATCH 0/3] i2c: designware: should not wait for enable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

there's a regression on Designware I2C controllers that do not implement
the IC_ENABLE_STATUS register, as detailed in thread
"[bug] some versions of designware i2c lack enable status register" at
https://www.spinics.net/lists/linux-i2c/msg34009.html

Unfortunately I did not hear anything back from Ben, not even regarding
the IP core revision on his board. Looking on my own, I've found that
there's a possible race with the interrupt handler that may be causing
problems.

Patch 1 adds missing IRQ synchronization, patch 2 reverts the commit
that caused a regression, and patch 3 is a bonus refactoring, as I 
believe the low-level enable-disable functionality is now quite messy.

Cc: Ben Gardner <gardner.ben@xxxxxxxxx>
Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx>

Alexander Monakov (3):
  i2c: designware: avoid race with interrupt handler
  Revert "i2c: designware: must wait for enable"
  i2c: designware: refactor low-level enable/disable

 drivers/i2c/busses/i2c-designware-common.c | 20 +++++++++-----------
 drivers/i2c/busses/i2c-designware-core.h   | 13 +++++++++++--
 drivers/i2c/busses/i2c-designware-master.c | 10 ++++++----
 drivers/i2c/busses/i2c-designware-slave.c  |  6 +++---
 4 files changed, 29 insertions(+), 20 deletions(-)

-- 
2.11.0




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux