From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32302CD5BD0 for ; Sat, 30 May 2026 09:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5Tz7bz6dX9G948lnWkl0CzkG89ZjwO69Hb6Asux763A=; b=mTCT8e1/x6S83xFyCV4aJfSdWa Ga7St8q18UqUWB5YTrMmxblRqyroBHFnxnWDHbDgpf2KSjHbUAj1H91612DWAZUlNCRaAK4o43+bM iKysQM/EGFmmXyP+IPWVXNVDSobWu/o6nv/e66TTp0GY+X0LVa1lT0oHbULR0Wj5y36loGPufM2/Q fm3EKD/mUFEl+bfhLLKfQSqmQYzFR05/id5ullTUegjvBzHDuEfs/ZHKPVCddW8GdJqLI+5bXeNZz ACtiN0XpHOnIpyKM2dGSU67UKD8dCg9rXSpFlIU+W/3hBPoN7OGt5YtiwG8lIOVm9AyaUYRrgSlje scKC/ukA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wTFog-00000008ZEC-2qNB; Sat, 30 May 2026 09:17:14 +0000 Received: from zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wTFod-00000008ZDo-0eyT for linux-arm-kernel@lists.infradead.org; Sat, 30 May 2026 09:17:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=k1; bh=5Tz7 bz6dX9G948lnWkl0CzkG89ZjwO69Hb6Asux763A=; b=HcwBzck3MSSjwprJqLpb D7oSe1xJTw5vsdWcMeKaMqKdFlEj1kEJeN6+7pyPGDPbfq8GgIhIUIAtgo3B83g8 BJLkjZM1PmtxjFq/7rlOYZQo/A9Vub3g4YCBY0f1DtBGABRlL9qcTZZxDVBDUkB8 crsJwfVH9yvaB/NgwXJenfkROx6JsD/Zu3RuOFDnyA5PaE2fXhJ68XVP7yZipdbY K0+30PQlZc8TP0qtdqsigcjpJI7hXekHeLoL+BYJkN+xQUyev/mqOaGkKG8Zxx2J aH5smIjF9LBRvRrKPLB4C0t7QjH0BZQWkmS8ysJE+7i4ZUYWJg/cs9JeDhf3/z/Q jQ== Received: (qmail 1702015 invoked from network); 30 May 2026 11:17:05 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 30 May 2026 11:17:05 +0200 X-UD-Smtp-Session: l3s3148p1@yyHJbAVT4aKSAB1K Date: Sat, 30 May 2026 11:17:05 +0200 From: Wolfram Sang To: Peter Rosin Cc: Marcus Folkesson , Michael Hennerich , Bartosz Golaszewski , Andi Shyti , Andy Shevchenko , Bartosz Golaszewski , 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 Message-ID: References: <20260324-i2c-mux-v9-0-5292b0608243@gmail.com> <20260324-i2c-mux-v9-5-5292b0608243@gmail.com> <776cefab-fa6c-4092-8b95-236a3eaac729@lysator.liu.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <776cefab-fa6c-4092-8b95-236a3eaac729@lysator.liu.se> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260530_021712_078413_882AD7AA X-CRM114-Status: GOOD ( 26.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > 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. > 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. > > > +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? Happy hacking everyone, Wolfram