From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E2FA3EB11B for ; Thu, 9 Jul 2026 08:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783586035; cv=none; b=a8XPcqu5fq6VpK+WxmMHpgNH5mEPnPxwVehjWUZrIFSL6ilPHsYPs339/7znW3RJNYaXL8f5+oMBfCtHXDGIFm+z9dirfH10NPufzYBrl6eXKoCN3Blls+O5rIsbIWW1bW0y0nPqO01HnKNlAvYSKKaSmp77YrLiIoVuHyERnN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783586035; c=relaxed/simple; bh=TPRtn6A80Mn/spKxDN6QBMjTm4oZsTH6ypctlg8LR78=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o7PJyFypInFczkM0M8EeaJ1R/xrznfdmxW9zjdYAxbIkF4/0WwHXJyjRau7RXWM7er93/JHRfphyWKzNxMJCRw9UAcpdbsINgwohcaCbOV7gOfkcBbVact7acdfeJAQLU1VP+bvDU25Ns8h12LbveppDZpiqToa5+IyUzvwKg7k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hxgBy87m; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hxgBy87m" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5aec201b582so1858423e87.1 for ; Thu, 09 Jul 2026 01:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783586032; x=1784190832; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=TPRtn6A80Mn/spKxDN6QBMjTm4oZsTH6ypctlg8LR78=; b=hxgBy87mO/L89009V7kbXaoRLq+pPE8TxGLYW0sXZNYGj8T+Qav4yFAB766jF6rMCz FPd4iRNgmU+42gD3ZOwnxVCDnYzAFQ2BlH4nfHigTVJ+wn2GuD0LDho4YXJ15HuJcWd1 ku13hD6VTcJydc3nxSgcPX+mIJmxOv2UeBy6/fQirkkeo88gEZXGHSUPKtMfcerylPPf s+vyKZLLL2OHHcpaNOSrCk9rHuffGvPh9uU9gq/nWU+rOkZR8hWBlIUcdOTGDWuwT8rC 438N8/NVMUCplYDC7mS6sZfP60onuQLGpGNMs8kkHUdDs0XmrIrK2YQHJSpefUFy6uWD knfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783586032; x=1784190832; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=TPRtn6A80Mn/spKxDN6QBMjTm4oZsTH6ypctlg8LR78=; b=LuMHRADMN7ZKm85lRAjgissOUSreSyNZ5rLT7BIapsvtR3RmdESP8CSE+ZL/gUzIz2 IT/MJcNnkDxEpIg9keeVkvTYABouNwUvh3e7g1HWjCc0SEU/yuvAvHYQH4UOCOYQJ5HS 4j4kMgEWbLccMieW0/2uyvIM/9udurcOXShtuxr9lMqDF6L2trO0QKtNt8ZEFvi3fbJj cdiIMMwnO7FMiiFF/ZGNOtpWJSNS6Se0xyfokKXFMJOBaEqsI0kjASNdvX7DRowsCtqS ifiL7bitprQvLXYNOnhV9KcxdiM4zceHssGg84o9CZEl2Z4r+l3iptIT/pqMvQSb8PNL mFXA== X-Forwarded-Encrypted: i=1; AHgh+Rqhfj1pg4tTrq06HMBrlvVdDBTGw42TTTwWt3aybNFBoFd3UqBbXYhwbBOMzbFcZT9x3EyOxzr6brUWJCQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yyzf92oe4r/j3gPrHuQyOKNe2lzEFSNEAcDHnSHG2ZCvQOqGAfK zV42kHFs8UMhTp7MT4YOPLg3OK84MIWs5rc5r227NXOU41uiXBuDoOLE X-Gm-Gg: AfdE7cmmMppjlBk5SCMOfevqAHbhpEd0WIn46JFpn/MQ+7xx+K/k2YSl7IKDLacx/i3 cgFGNRedoriyaC2trS1udWaIseYVnIYb9IqO9lOfO+tD39Vpgs273uHyn/prtjX2pVNLxdVJrgT TM3BivvzIequCEbP/Bv/j3NtqZlglKiqOwsYn0vFd+ILm2FHiaz0gXBdA6o4y0m3GBft8G+3h+w FzG1xQR+/ZZgVy51QKR5Syu+zO67EonRBs9Js2nh8V+vhIBeE9fBBPmZzVYFIU4LUOT1OJDfVsm TouZCqf/9UitMvP9f0VZ3h20bHAe7Hd7pUwIZ7Qsd1yhuPH/SPEdHGXYthiLP2g/rgfXZivZRCK SqHzkW4gzHapQ9ESm94/Zf4Lduca1XzsZutXgwr9zAK704h3SZl462H4mu4bO2BMddB3yaxeLSl RyjnXIPLq2vgXOscAmiUj6uRg/l+vdqe3kMa0ouNmFy6JsklQdZA== X-Received: by 2002:a05:6512:3af:b0:5ae:bcf8:e7d0 with SMTP id 2adb3069b0e04-5b011477c08mr1015479e87.55.1783586031526; Thu, 09 Jul 2026 01:33:51 -0700 (PDT) Received: from gmail.com (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-39c84b13542sm2253471fa.11.2026.07.09.01.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 01:33:49 -0700 (PDT) Date: Thu, 9 Jul 2026 10:33:46 +0200 From: Marcus Folkesson To: Andy Shevchenko Cc: Wolfram Sang , Michael Hennerich , Bartosz Golaszewski , Andi Shyti , Bartosz Golaszewski , Peter Rosin , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v10 0/7] I2C Mux per channel bus speed Message-ID: References: <20260708-i2c-mux-v10-0-09dca03c8a15@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Hi Andy, On Wed, Jul 08, 2026 at 10:37:14PM +0300, Andy Shevchenko wrote: > On Wed, Jul 08, 2026 at 02:16:12PM +0200, Marcus Folkesson wrote: > > This was a RFC on how to implement a feature to have different bus > > speeds on different channels with an I2C multiplexer/switch. > > As no major complaints on the design came up during the review, I > > decided to submit the series without the RFC tag. > >=20 > > The benefit with this feature is that you may group devices after > > the fastest bus speed they can handle. > > A real-world example is that you could have e.g. a display running @400= kHz > > and a smart battery running @100kHz using the same I2C controller. > >=20 > > There are many corner cases where this may cause a problem for some > > hardware topologies. I've tried to describe those I could think of > > in the documentation, see Patch #5. > >=20 > > E.g. one risk is that if the mux driver does not disconnect channels > > when Idle, this may cause a higher frequency to "leak" through to > > devices that are supposed to run at lower bus speed. > > This is not only a "problem" for changing bus speed but could also be > > an issue for potential address conflicts. > >=20 > > This patchset has been used and tested heavily the last months > > on a custom board based on a da850 (DaVinci) platform. >=20 > ... >=20 > > Changes in v10: > >=20 > > - Fix gramatics in documentation > > - Move {__,}i2c_adapter_set_clk_freq() to i2c-mux.c >=20 > Can you point to the discussion where it was suggested, please? > It was like ages ago (too many patches to review) and I probably > missed and/or forgot the rationale for that. Also if we move > to i2c-mux, why do we leave it in the adapter namespace? Hrm, it seems like the mailing list wasn't CC:ed for that comment. It was suggested by Peter and the rationale to remove it was: " I'not sure it's a good idea to expose {__,}i2c_adapter_set_clk_freq(). Do we really want to make it so simple for random (non-mux) I2C drivers to muck about with the bus speed? Any bus speed changes not coordinated with mux-locked bus speed changes are going to be problematic. This is shown by the discussion about D2 for the multi-level mux-locked example (patch 5/5) -> it is problematic even when the bus speed is changed by the mux code itself. I think these helpers should be moved from i2c.h to i2c-mux.c. " >=20 > > - Make set_clk_freq() return actual frequency > > - Reimplement idle_state (from earlier version) > > - Implement example on idle_state for ltc4306 > > - Link to v9: https://lore.kernel.org/r/20260324-i2c-mux-v9-0-5292b0608= 243@gmail.com >=20 > FWIW, I briefly read the v9 discussion and haven't got the above move, > seems wasn't discussed there? >=20 > --=20 > With Best Regards, > Andy Shevchenko >=20 >=20 Best regards, Marcus Folkesson