From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Peter Rosin <peda@axentia.se>,
Michael Hennerich <michael.hennerich@analog.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Andi Shyti <andi.shyti@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 1/5] i2c: core: add callback to change bus frequency
Date: Mon, 23 Feb 2026 16:53:56 +0200 [thread overview]
Message-ID: <aZxqBOaFId-9WfnR@smile.fi.intel.com> (raw)
In-Reply-To: <20260223-i2c-mux-v7-1-ec75b214718a@gmail.com>
On Mon, Feb 23, 2026 at 03:33:50PM +0100, Marcus Folkesson wrote:
> All devices on the same I2C bus share the same clock line and the bus
> frequency has therefor be chosen so that all attached devices are able
> to tolarate that clock rate. IOW, the bus speed must be set for the
> slowest attached device.
>
> With I2C multiplexers/switches on the other hand, it would be possible
> to have different "domains" that runs with different speeds.
>
> Prepare for such a feature by provide an optional callback function to
> change bus frequency.
>
> As a side effect, several bus drivers keep the bus speed in a
> private structure and can now have this value stored in a uniform way
> instead.
...
> + /*
> + * If the adapter is a root adapter without set_clk_freq implemented, this feature is not
> + * supported
> + */
> + if (!i2c_parent_is_i2c_adapter(adapter))
> + return -EOPNOTSUPP;
> +
> + /* Update the clock_hz for non-root adapters, even if set_clk_freq is not implemented,
> + * to allow * the clock frequency to be propagated to root adapters that do support it.
> + */
/*
* Please, keep the style of multi-line comment consistent
* and as per above.
*/
> + adapter->clock_hz = clock_hz;
> + return 0;
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-02-23 14:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 14:33 [PATCH v7 0/5] I2C Mux per channel bus speed Marcus Folkesson
2026-02-23 14:33 ` [PATCH v7 1/5] i2c: core: add callback to change bus frequency Marcus Folkesson
2026-02-23 14:53 ` Andy Shevchenko [this message]
2026-02-23 14:55 ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 2/5] i2c: mux: add support for per channel " Marcus Folkesson
2026-02-23 14:57 ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 3/5] i2c: davinci: calculate bus freq from Hz instead of kHz Marcus Folkesson
2026-02-23 14:59 ` Andy Shevchenko
2026-03-09 11:14 ` Marcus Folkesson
2026-03-09 11:33 ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 4/5] i2c: davinci: add support for setting bus frequency Marcus Folkesson
2026-02-23 15:01 ` Andy Shevchenko
2026-02-23 14:33 ` [PATCH v7 5/5] docs: i2c: i2c-topology: add section about bus speed 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=aZxqBOaFId-9WfnR@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andi.shyti@kernel.org \
--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=marcus.folkesson@gmail.com \
--cc=michael.hennerich@analog.com \
--cc=peda@axentia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox