From: Wolfram Sang <wsa@the-dreams.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Linux I2C <linux-i2c@vger.kernel.org>,
Ulrich Hecht <uli+renesas@fpond.eu>
Subject: Re: [PATCH v2] i2c: sh_mobile: implement atomic transfers
Date: Thu, 25 Jun 2020 08:59:44 +0200 [thread overview]
Message-ID: <20200625065944.GA970@ninjato> (raw)
In-Reply-To: <CAMuHMdVcfE9MRB-wh6Op-Juhhd1XG4vmf4eVNhBcUvQs1Zz8AA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
Hi Geert,
> > static inline bool i2c_in_atomic_xfer_mode(void)
> > {
> > return system_state > SYSTEM_RUNNING && irqs_disabled();
>
> So i2c atomic transfers are really meant to be used during late system suspend
> only, and not in atomic context before, when irqs_disabled() is true?
Yes. It is all some time ago, I recall we agreed that there shouldn't be
any other I2C communication at irqs_disabled() stage.
> Perhaps we need a checker config option, to make sure the atomic transfer
> operation is exercised at least once during boot?
Testing I2C controllers (in various ways) is a well-desired feature :/
> Do we need a way to let i2c slaves indicate they plan to use atomic
> transfers later, so the i2c core can keep the i2c controller resumed?
I wanted to have this originally, but in the end I gave up on it. IIRC,
you don't want to whitelist a client in general, but only the very late
messages it sends. However, if a message needs to be flagged may be
board specific. It all looked messy and hard to configure, so we ended
up with what we have now.
Take all this with a grain of salt, it's been a while since the
discussions happened.
All the best,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-06-25 6:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 15:05 [PATCH v2] i2c: sh_mobile: implement atomic transfers Ulrich Hecht
2020-06-18 16:39 ` Geert Uytterhoeven
2020-06-21 11:39 ` Geert Uytterhoeven
2020-06-25 6:59 ` Wolfram Sang [this message]
2020-06-25 7:06 ` Wolfram Sang
2020-06-25 8:18 ` Geert Uytterhoeven
2020-06-25 8:33 ` Wolfram Sang
2020-06-25 15:16 ` Wolfram Sang
2020-06-30 19:45 ` Wolfram Sang
2020-06-30 19:58 ` Geert Uytterhoeven
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=20200625065944.GA970@ninjato \
--to=wsa@the-dreams.de \
--cc=geert@linux-m68k.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=uli+renesas@fpond.eu \
/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