All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Peter Rosin <peda@lysator.liu.se>,
	Michael Hennerich <michael.hennerich@analog.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Andi Shyti <andi.shyti@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	Bartosz Golaszewski <brgl@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v9 5/5] docs: i2c: i2c-topology: add section about bus speed
Date: Sun, 31 May 2026 12:51:35 +0200	[thread overview]
Message-ID: <ahwSt2wYHp-cjWK5@gmail.com> (raw)
In-Reply-To: <ahqrEe_m4K4T7LaC@shikoro>

Hi all!

On Sat, May 30, 2026 at 11:17:05AM +0200, Wolfram Sang wrote:
> 
> > What makes the topology bad is D2. Without that device, it should
> > be OK. So, the question is which is more important?
> > 1. protect ignorant system designers from creating a topology
> >    that includes problematic devices like D2
> > 2. allow multi-level mux-locked muxes with variable bus-speed at all
> 
> My take is: as a generic operating system, we should try hard to
> maintain a reliable system. If a device gets stalled and blocks the bus
> because of a too high frequency, this is really bad.
> 
> Now, if this is a flaw of the HW design, we can only do so much but not
> more. If the HW design is OK, we should not introduce risks. This is why
> I want to disable this feature for MUX_IDLE_AS_IS. It cannot work in
> this setup, but the bus itself is likely designed OK and would work at
> the lowest speed.
> 
> > Checking the rules at run-time feels complicated to me, as devices
> > may come and go. Also, naming people "ignorant" over a mistake such
> > as the above in 1 is perhaps not all that fair. But, it feels sad
> > to disallow things that in fact do work.
> 
> Like I said, as a generic OS, we should play safe. If someone wants to
> implement a more risky version, it can be built on top of what we have.
> This is agreeing to "I want this and I know I am on my own now".
> Obviously, it reduces maintenance burden a lot.
> 
> > > ... unlike here. We have MUX_IDLE_AS_IS and MUX_IDLE_DISCONNECT defined
> > > already. And I'd think we should only allow bus speed switching for
> > > MUX_IDLE_DISCONNECT to avoid out-of-spec scenarios. Opinions?
> > 
> > It is probably not unwise to disallow MUX_IDLE_AS_IS in this context,
> > at least until someone actually needs it. Which does not seem all that
> > likely?
> 
> Exactly.

I agree as well.

> 
> > However, it seems like it should be fairly OK to allow a predefined
> > idle channel, as long as that channel is not lowering the bus speed
> > compared to the parent. But maybe supporting that can also wait for
> > an actual user?
> 
> I agree as well. I hope that Marcus' use-case is MUX_IDLE_DISCONNECT.

My use-case is MUX_IDLE_DISCONNECT :-)

> 
> > > > +Supported controllers
> > > > +-----------------------
> > > > +
> > > > +Not all I2C controllers support setting the bus speed dynamically.
> > > > +At the time of writing, the following controllers have support:
> > > > +
> > > > +============================   =============================================
> > > > +i2c-davinci                    Supports dynamic bus speed
> > > > +============================   =============================================
> > > 
> > > This paragaph is easy to get outdated. We can document that only
> > > controller drivers with the callback function implemented will work.
> > > People then can find out if that applies for their driver...
> > 
> > There are other such hard-to-maintain lists elsewhere in the text.
> > Not saying that this makes neither those nor this list a good idea,
> > but it is an explanation for adding one more.
> 
> You mean the list if a driver uses parent-locked or mux-locked. What
> about putting that information into the driver? The core could enforce
> that it is set to a meaningful value and not left uninitialized?

I would prefer to have this information in the driver.
But I must also say that I found the list in the documentation useful
when I started to work on this.

But it is hard to maintain and not optimal indeed.


> 
> Happy hacking everyone,
> 
>    Wolfram
> 

Best regards,
Marcus Folkesson

  reply	other threads:[~2026-05-31 10:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 13:54 [PATCH v9 0/5] I2C Mux per channel bus speed Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 1/5] i2c: core: add callback to change bus frequency Marcus Folkesson
2026-05-26 19:47   ` Wolfram Sang
2026-05-31 10:18     ` Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 2/5] i2c: mux: add support for per channel " Marcus Folkesson
2026-03-24 14:10   ` Andy Shevchenko
2026-03-26 11:39     ` Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 3/5] i2c: davinci: calculate bus freq from Hz instead of kHz Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 4/5] i2c: davinci: add support for setting bus frequency Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 5/5] docs: i2c: i2c-topology: add section about bus speed Marcus Folkesson
2026-05-26 19:48   ` Wolfram Sang
2026-05-30  6:54     ` Peter Rosin
2026-05-30  9:17       ` Wolfram Sang
2026-05-31 10:51         ` Marcus Folkesson [this message]
2026-05-31 10:42       ` Marcus Folkesson
2026-05-31 10:25     ` Marcus Folkesson
2026-03-26 12:17 ` [PATCH v9 0/5] I2C Mux per channel " Marcus Folkesson
2026-04-13  7:45 ` Marcus Folkesson
2026-05-08 13:14 ` Marcus Folkesson

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=ahwSt2wYHp-cjWK5@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=brgl@bgdev.pl \
    --cc=brgl@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=peda@lysator.liu.se \
    --cc=wsa+renesas@sang-engineering.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.