Re: [PATCH] i2c: ocores: Add missing wake_up() call upon state change to STATE_DONE

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

 



Hi Peter,

first sorry for the delay.

On 16.06.2017 15:26, Peter Korsgaard wrote:
"Stefan" == Stefan Roese <sr@xxxxxxx> writes:

Hi,

  >> It is close to 10 years ago since I last had access to any boards with
  >> the ocores controller, but the logic in ocores_process() indicates that
  >> the controller would generate another interrupt once the stop condition
  >> has been sent:
  >>
  >> if ((i2c->state == STATE_DONE) || (i2c->state == STATE_ERROR)) {
  >> /* stop has been sent */
  >> oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
  >> wake_up(&i2c->wait);
  >> return;
  >> }
  >>
  >> Do you not see this interrupt?

  > No. It took me quite some time last week, to notice this misbehavior
  > in this I2C driver. As the client (Goodix I2C touchscreen) always
  > returned only after more than 1 second from reading one I2C frame.

Funky. On what kind of platform / what VHDL source version is this?

Thanks for looking into this. It seems that we had a quite old
version of the OpenCores I2C core implemented on our Altera /
Intel Arria V board:

Rev 1.2 (2001/11/10)

The
driver has now existed for more than 10 years and has had contributions
from a number of people, but this is the first time I hear about this
missing interrupt.

After updating to the latest version from OpenCores, the issue
with the missing interrupt seems to be resolved. So this patch
can be dropped.

Thanks,
Stefan



[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