[PATCH v5 2/5] i2c: mux: add support for per channel bus frequency

Peter Rosin peda at axentia.se
Fri Feb 13 08:35:16 PST 2026


Hi!

2026-02-13 at 17:05, Marcus Folkesson wrote:
> Hi Peter!
> 
> On Fri, Feb 13, 2026 at 12:48:13PM +0100, Peter Rosin wrote:
>> Hi!
>>
> 
> [...]
> 
>>> +	if (priv->adap.clock_hz && priv->adap.clock_hz != parent->clock_hz) {
>>> +		mux_locked_ancestor = i2c_mux_topmost_mux_locked(adap);
>>> +		root = i2c_root_adapter(&adap->dev);
>>> +
>>> +		/*
>>> +		 * If there's a mux-locked mux in our ancestry, lock the parent
>>> +		 * of the topmost one. Mux-locked muxes don't propagate locking
>>> +		 * to their parents, so we must explicitly acquire the lock above
>>> +		 * the highest mux-locked ancestor to reach the root adapter.
>>> +		 */
>>
>> As may be more apparent from my recent v4 response(?), this is not
>> what you want. You want mux_locked_ancestor to be the nearest
>> mux-locked ancestor.
> 
> Hrm, I think we are pointing at the same thing but naming it differently; M1 in this chain:
> Root - P1 - M1 - M2 - P2 - D1
> 
> I'm thinking 'topmost' means the one closest to the root (ancestor most
> far away), but I don't stick to that naming and I am happy to change it.

That fact that we both point to M1 is incidental. If you instead have

	Root - P1 - M0 - P0 - M1 - M2 - P2 - D1

you still want to "restart" locking from M1, not M0. I think.

Cheers,
Peter



More information about the linux-arm-kernel mailing list