Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1349601 > unrolled thread
| Started by | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| First post | 2016-03-03 22:40 +0100 |
| Last post | 2016-03-04 12:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] i2c: imx: add slave support. v2 Wolfram Sang <wsa@the-dreams.de> - 2016-03-03 22:40 +0100
Re: [PATCH] i2c: imx: add slave support. v2 Maxim Syrchin <syrchin@dev.rtsoft.ru> - 2016-03-04 12:30 +0100
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2016-03-03 22:40 +0100 |
| Subject | Re: [PATCH] i2c: imx: add slave support. v2 |
| Message-ID | <r8J8u-4LK-21@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Jan 26, 2016 at 07:14:40PM +0300, Dmitriy Baranov wrote:
> Add I2C slave provider using the generic slave interface.
> It also supports master transactions when the slave in the idle mode.
>
> Issues:
> Changes work only in PIO mode (when driver doesn`t use DMA)
This is fine with me. We don't support block transfers currently in the
slave core anyhow.
> There are might be race conditions.
Can you name them
> +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?
[toc] | [next] | [standalone]
| From | Maxim Syrchin <syrchin@dev.rtsoft.ru> |
|---|---|
| Date | 2016-03-04 12:30 +0100 |
| Message-ID | <r8W5I-5SG-9@gated-at.bofh.it> |
| In reply to | #1349601 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web