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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 334AAC433EF for ; Tue, 5 Oct 2021 16:31:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C99A611C1 for ; Tue, 5 Oct 2021 16:31:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236485AbhJEQdc (ORCPT ); Tue, 5 Oct 2021 12:33:32 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:40973 "EHLO mslow1.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236512AbhJEQd3 (ORCPT ); Tue, 5 Oct 2021 12:33:29 -0400 Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 39547D5799; Tue, 5 Oct 2021 16:28:41 +0000 (UTC) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id CD54AFF806; Tue, 5 Oct 2021 16:28:16 +0000 (UTC) Date: Tue, 5 Oct 2021 18:28:16 +0200 From: Alexandre Belloni To: Arnd Bergmann List-Id: Cc: =?utf-8?B?UGF3ZcWC?= Anikiel , jarkko.nikula@linux.intel.com, Andy Shevchenko , Mika Westerberg , Rob Herring , Philipp Zabel , Olof Johansson , SoC Team , Dinh Nguyen , Pratyush Yadav , Tudor Ambarus , Linux I2C , Linux Kernel Mailing List , Sebastian Reichel , "Leizhen (ThunderTown)" , Jonathan Cameron , DTML , Linux ARM , ka@semihalf.com, Tomasz Nowicki , jam@semihalf.com, amstan@google.com Subject: Re: [PATCH v2 2/4] dt-bindings: add bus number property Message-ID: References: <20211005143748.2471647-1-pan@semihalf.com> <20211005143748.2471647-3-pan@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/10/2021 18:22:12+0200, Arnd Bergmann wrote: > On Tue, Oct 5, 2021 at 4:37 PM Paweł Anikiel wrote: > > > > On SoCFPGA systems, it's desireable to have fixed numbering for > > i2c busses, while being able to enable/disable them (e.g. have i2c1 > > be mapped to /dev/i2c-1, even though i2c0 is disabled). This can also > > be achieved using devicetree aliases (see i2c_add_adapter). However, > > having the driver be self-contained without relying on aliases is more > > robust. > > > > Signed-off-by: Paweł Anikiel > > I don't see how adding a nonstandard property in one of the i2c bus > drivers helps at all. How do you expect this to work when there are > multiple i2c controllers in the system using different drivers? What > should happen if both an alias and the busno property are set? > What happens when two nodes have the same busno property because e.g. one is in a dtsi and the other one is in a dts? -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com