linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Syrchin <syrchin@dev.rtsoft.ru>
To: Wolfram Sang <wsa@the-dreams.de>,
	Dmitriy Baranov <dbaranov@dev.rtsoft.ru>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: imx: add slave support. v2
Date: Fri, 4 Mar 2016 14:06:10 +0300	[thread overview]
Message-ID: <56D96C22.8030104@dev.rtsoft.ru> (raw)
In-Reply-To: <20160303213509.GF1501@katana>

Hi Wolfram,
I'm now working on creating new driver version. I think I'll be able to 
sent it soon.

04.03.2016 0:35, Wolfram Sang пишет:
>> There are might be race conditions.
> Can you name them
Most of races are fixed already. There were some issues with interrupt 
latencies  - sometimes slave interrupt appears in process of starting 
master xfer.
>> +enum imx_i2c_slave_state {
>> +	I2C_IMX_SLAVE_IDLE,
>> +	I2C_IMX_SLAVE_IRQ,
>> +	I2C_IMX_SLAVE_POLLING
> Highlevel question first: Why do you have polling? Why would anyone not
> want to use interrupts here?
Since imx doesn't generate interrupt on "bus stop" condition we'd had to 
implement polling scheme. Interrupts are used for starting polling and 
for  waking polling loop on new slave request. Without polling we can't 
handle "end-of-packet" event correctly.

In current version states are:

	I2C_IMX_SLAVE_IDLE // default state. slave process is waiting for interrupt
	I2C_IMX_SLAVE_POLLING // slave transfer is in process.
	I2C_IMX_MASTER   // master transfer is in process.

      reply	other threads:[~2016-03-04 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 16:14 [PATCH] i2c: imx: add slave support. v2 Dmitriy Baranov
2016-03-03 21:35 ` Wolfram Sang
2016-03-04 11:06   ` Maxim Syrchin [this message]

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=56D96C22.8030104@dev.rtsoft.ru \
    --to=syrchin@dev.rtsoft.ru \
    --cc=dbaranov@dev.rtsoft.ru \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).