All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Torsten Fleischer <to-fleischer-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: i2c-mxs: Problems with PIO mode on iMX28
Date: Fri, 28 Jun 2013 11:13:33 +0200	[thread overview]
Message-ID: <20130628091332.GA2948@katana> (raw)
In-Reply-To: <19340213.PSZe5UysTs-BVXpyJtzy6LO1Ldfs0Uenw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]


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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-06-28  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 17:39 i2c-mxs: Problems with PIO mode on iMX28 Torsten Fleischer
     [not found] ` <19340213.PSZe5UysTs-BVXpyJtzy6LO1Ldfs0Uenw@public.gmane.org>
2013-06-28  9:13   ` Wolfram Sang [this message]
2013-06-28  9:56     ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130628091332.GA2948@katana \
    --to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=to-fleischer-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.