From: Wolfram Sang <wsa@the-dreams.de>
To: "Adamski, Krzysztof (Nokia - PL/Wroclaw)" <krzysztof.adamski@nokia.com>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Guenter Roeck <linux@roeck-us.net>,
Tobias Jordan <Tobias.Jordan@elektrobit.com>,
Peter Rosin <peda@axentia.se>,
"Sverdlin,
Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@nokia.com>
Subject: Re: [PATCH v2] i2c: axxia: support sequence command mode
Date: Mon, 17 Dec 2018 23:31:22 +0100 [thread overview]
Message-ID: <20181217223122.ye5as5dn5f7rm2a4@ninjato> (raw)
In-Reply-To: <20181213120926.GA10479@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]
On Thu, Dec 13, 2018 at 12:09:38PM +0000, Adamski, Krzysztof (Nokia - PL/Wroclaw) wrote:
> In order to comply with SMBus specification, the Axxia I²C module will
> abort the multi message transfer if the delay between finishing sending
> one message and starting another is longer than 25ms. Unfortunately it
> isn't that hard to trigger this situation on a busy system. In order to
> fix this problem, we should make sure hardware does whole transaction
> without waiting for software to fill some data.
>
> Fortunately, in addition to Manual mode that is currently used by the
> driver to perform I²C transfers, the module supports also so called
> Sequence mode. In this mode, the module automatically performs
> predefined sequence of operations - it sends a slave address, transmits
> specified number of bytes from the FIFO, changes transfer direction,
> resends the slave address and then reads specified number of bytes to
> FIFO. While very inflexible, this does fit a most common case of multi
> message transfer - the one where you first write a register number you
> want to read and then read it.
>
> To use this mode effectively, a number of conditions must be met to
> ensure the transaction does fit the predefined sequence. In case this is
> not the case, a fallback to manual mode is used.
>
> The initialization of this mode is very similar to Manual mode. The most
> notable difference is different bit in the Master Interrupt Status
> designating finishing of transaction. Also some of the errors, like TSS,
> cannot happen in this mode.
>
> While it is possible to support transactions requesting a read of any
> size (RFL interrupt will be generated when FIFO size is not enough) the
> TFL interrupt is not available in this mode, thus the write part of the
> transaction cannot exceed FIFO_SIZE (8).
>
> Note that in case of a NAK during transaction, the NA/ND status bits
> will be set before STOP command is generated, triggering an interrupt
> while the controller is still busy. Current solution for this problem is
> to actively wait for this command to stop before leaving xfer callback.
>
> Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Fixed this 'checkpatch --strict' warning:
CHECK: braces {} should be used on all arms of this statement
#201: FILE: drivers/i2c/busses/i2c-axxia.c:422:
... and applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-12-17 22:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 15:00 [PATCH 0/3] i2c-axxia: support Sequence command Adamski, Krzysztof (Nokia - PL/Wroclaw)
2018-12-10 15:00 ` [PATCH 1/3] i2c-axxia: dedicated function to set client addr Adamski, Krzysztof (Nokia - PL/Wroclaw)
2018-12-11 12:00 ` Sverdlin, Alexander (Nokia - DE/Ulm)
2018-12-11 20:05 ` Wolfram Sang
2018-12-10 15:01 ` [PATCH 2/3] i2c-axxia: check for error conditions first Adamski, Krzysztof (Nokia - PL/Wroclaw)
2018-12-11 12:02 ` Sverdlin, Alexander (Nokia - DE/Ulm)
2018-12-11 20:05 ` Wolfram Sang
2018-12-10 15:05 ` [PATCH 3/3] i2c-axxia: support sequence command mode Adamski, Krzysztof (Nokia - PL/Wroclaw)
2018-12-11 12:05 ` Sverdlin, Alexander (Nokia - DE/Ulm)
2018-12-11 20:04 ` Wolfram Sang
2018-12-13 12:09 ` [PATCH v2] i2c: axxia: " Adamski, Krzysztof (Nokia - PL/Wroclaw)
2018-12-13 12:45 ` Sverdlin, Alexander (Nokia - DE/Ulm)
2018-12-17 22:31 ` Wolfram Sang [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=20181217223122.ye5as5dn5f7rm2a4@ninjato \
--to=wsa@the-dreams.de \
--cc=Tobias.Jordan@elektrobit.com \
--cc=alexander.sverdlin@nokia.com \
--cc=krzysztof.adamski@nokia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=peda@axentia.se \
/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