Re: i2c-mxs: Problems with PIO mode on iMX28

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

 



CCing Marek Vasut and Pengutronix...

On Thu, Jun 27, 2013 at 07:39:45PM +0200, Torsten Fleischer wrote:
> Hi,
> 
> on my board there is a temperature sensor TCN75A (compatible to LM75) 
> connected to the iMX283.
> In the user space the temperature is periodically polled by reading the file 
> /sys/bus/i2c/devices/0-0048/temp1_input.
> When triggering this file the LM75 driver consecutively reads 3 registers from 
> the sensor and outputs the current temperature read from register 0.
> 
> With linux 3.9.7 I sometimes get a communication timeout when reading the 
> sensor.
> 
> Since several patches have been added to the driver, I tried linux 3.10-rc7. 
> With this version no timeout will be reported, but sometimes the value 
> returned seems to be wrong. Normally I get a value of round about 30000. But 
> sometimes it takes some seconds to read the temperature and the returned value 
> is 75000. This value is not the current temperature but the temperature 
> hysteresis that is the content of register 2 of the sensor. 
> 
> After some investigation I found that the i2c-mxs driver sometimes times out 
> while waiting for the MXS_I2C_DEBUG0_DMAREQ bit when writing data (the 
> I2C_M_RD flag is not set).
> Unfortunately this error is never reported to the I2C core and thus to the 
> LM75 driver. So the LM75 driver assumes that it has received the correct 
> values.
> 
> This problem seems to be only in the PIO mode. After changing the driver so 
> that the DMA is always used it works as expected.
> 
> Best regards,
> Torsten Fleischer
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: Digital signature


[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