linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Peter Rosin <peda@axentia.se>
Cc: "Adamski,
	Krzysztof (Nokia - PL/Wrocław)" <krzysztof.adamski@nokia.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: Two separate i2c transfers
Date: Fri, 15 May 2020 11:31:50 +0200	[thread overview]
Message-ID: <20200515093150.GD2077@ninjato> (raw)
In-Reply-To: <ec8ed2fb-710e-29c0-8c27-340de0bacfa6@axentia.se>

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


> > I was assuming that once you have the lock from the arbitrator you can
> > be sure that the other master is not active and, thus, you maybe don't
> > need to read the status register at all? But I am probably wrong here.
> 
> You are right in that when you have the lock from the arbtrator, you
> lock the other master(s) out, but the issue here is that the mux code
> releases the arbitrator lock after each xfer. Krzysztof needs to do
> two xfers with the arbitrator lock held over both so that another
> master cannot sneak in and change the world view.

Yes. My probably wrong assumption was that the first part of the
transfer (reading a status reg) was only to check if another master has
started the device and is running some operation. So, if we could avoid
that this happens by proper locking of the arbitrator, you could either
skip the first part of the transaction or just send both in one go.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-05-15  9:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 12:41 Two separate i2c transfers Adamski, Krzysztof (Nokia - PL/Wrocław)
2020-05-14 14:50 ` Wolfram Sang
2020-05-15  7:04   ` Adamski, Krzysztof (Nokia - PL/Wrocław)
2020-05-15  7:53     ` Wolfram Sang
2020-05-15  8:51       ` Adamski, Krzysztof (Nokia - PL/Wrocław)
2020-05-15  9:20         ` Wolfram Sang
2020-05-15  9:24           ` Peter Rosin
2020-05-15  9:31             ` Wolfram Sang [this message]
2020-05-15  9:46           ` Adamski, Krzysztof (Nokia - PL/Wrocław)
2020-05-15  8:02     ` Peter Rosin
2020-05-15  8:36       ` Adamski, Krzysztof (Nokia - PL/Wrocław)
2020-05-15 21:19         ` Peter Rosin
2020-05-17 21:32           ` Peter Rosin
2020-05-19 12:59             ` Adamski, Krzysztof (Nokia - PL/Wrocław)

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=20200515093150.GD2077@ninjato \
    --to=wsa@the-dreams.de \
    --cc=krzysztof.adamski@nokia.com \
    --cc=linux-i2c@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).