Please help with I2c on S3c processor
Ben Dooks
ben-linux at fluff.org
Wed May 5 21:27:22 EDT 2010
On Tue, May 04, 2010 at 11:25:05AM +0200, Guido Piasenza wrote:
> Hi everyone,
>
> I tried to look up this topic everywhere but could not find any
> reference to it...
>
> I am writing a software which interfaces a S3C processor to an A/D
> through I2C. I am controlling everything in user mode, i.e. I write a
> strobe and channel selection command to the I2C and I read the results
> with a word read.
>
>
> The problem is that each read and write operation eats up 10ms. I am not
> sure where these ms come from, I will try to put some traces in the bus
> driver to see where it's lost but I suspect that the calling thread is
> not immediately rescheduled when the interrupt comes and wakes it up. I
> tried setting the scheduler to FIFO and RR, with priority 99, with and
> without preemption in the kernel but nothing changes.
>
>
> What am I doing wrong ? I checked data with the oscilloscope to see if
> the baud rate is too slow but it seems data get sent out very fast and
> then there is a 10ms delay before further data comes out.
there's an msleep() in the driver after each transaction. you could try
applying Mark Brown's patch currently in my i2c-next tree to see how
much that helps.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
More information about the linux-arm
mailing list