Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp623694pxm; Thu, 3 Mar 2022 00:57:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9H0WMkoiA6p9SfPl0rJLZBwToXpBGcNI41L1mWWDGgtoNbHcWG/Sa9htIvXQ5J7bk0Qcd X-Received: by 2002:a17:90a:bb0d:b0:1bd:3baf:c8b4 with SMTP id u13-20020a17090abb0d00b001bd3bafc8b4mr4197862pjr.15.1646297828379; Thu, 03 Mar 2022 00:57:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646297828; cv=none; d=google.com; s=arc-20160816; b=hPslkLvnE8yClE8sPyietg3+Dwlhz5M1C+/nk2vANEDjXSPabzlQzE9t4D+JN/nvax GMRDgDXQrBOWO8sJ9NZTC5lBO5DcJhlc4U4t6QeIYwJ6pVLc5mutUa5BQh4Bf6N6qEHg 9iXeF1RHA7+tG/uhd2TfLMePBTYHjYCsKb+9tJZFxSM+B9Xt0IHIkrWQSfvVrTHYg1dX v560VsSEbssLpDVlKmPeTHSPfvT5Sv16p3+lCKxsHTz8XGMIQPonXztno2YneavRR03q KjVAnOjAnKhZcJVEZAJpi+3VmYnIPVi6+fy2uTAz5CHNirQjTsQgkg+WqDKpkIIG3eeO QuBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=5UW3cjbm8xQStGhB2RvIfU4jnFusyu8R3w5M3pRZH24=; b=o8VZs+wj7IKekLEYOY0KolpmURcwF6RCCfvesh5CJr/7bR4gRNFAkU38RYAQP3BLd4 zaPQ+gFPMdHEjSo20SSbb+GVULiR2nPdu/0F8HdraRT1x5UIV+xUCCzobJ+ohSh9nSFa HhmqkrtqrOKj4Yh5Pe/fFETE/UHinlWv+FNv+qYkHNx1AQcU5SmyJtCMyh+m9USYNYoI xZh2aVtrseI/mfL4urLpD7kzQldcHl/T+X8+FSAo64FqvWDyKywhUfe/ODWGz11Dr2Lh RNkqmCYej7K9SxwFuB39fEIf2PeWrKCBq6SknMKrG3EJLDQp78VZcwic2nOXlxfOd3lG 0FUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dANPvPfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p22-20020a1709027ed600b001501c29b560si1710390plb.402.2022.03.03.00.56.52; Thu, 03 Mar 2022 00:57:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dANPvPfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230378AbiCCIu6 (ORCPT + 99 others); Thu, 3 Mar 2022 03:50:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231686AbiCCIuz (ORCPT ); Thu, 3 Mar 2022 03:50:55 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEAEF175866; Thu, 3 Mar 2022 00:50:08 -0800 (PST) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id A7171FF808; Thu, 3 Mar 2022 08:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1646297407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5UW3cjbm8xQStGhB2RvIfU4jnFusyu8R3w5M3pRZH24=; b=dANPvPfz8FfZs3WYqIq9bl4LlaLJLTAlJ5KjEa5/oSz4t4sxrd/UksWc73/lSCGG+nrHCd mQIxG3Ur43o8TMewlH30a6KsQHToz3ai9gTjVkLYOfs1J0ysL1HCB5xUmtUX3PGTynenxc C9JR86pqix6ZdzHmr4NC1Xi/zegZdOfIZIewOvdoXVb8ro7spl0+Vg6PcWaqO+k2QU+Zyr IZ/nAzMfgna+2fCIn63SCZP9bEOTTG/pLhMuc694mgQVT8ubQa8/cmDsgN7/OandstlQoA RwRHGSWNGI6ycsn7veJsYuVOW0Xp94gZ89qONjeyTS3SL9/Y9UjVGSN76TCcQA== Date: Thu, 3 Mar 2022 09:48:40 +0100 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Mark Brown Cc: Hans de Goede , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Wolfram Sang , Peter Rosin , Russell King , Andrew Lunn , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org, netdev@vger.kernel.org, Thomas Petazzoni , Alexandre Belloni Subject: Re: [RFC 00/10] add support for fwnode in i2c mux system and sfp Message-ID: <20220303094840.3b75c4c9@fixe.home> In-Reply-To: References: <20220221162652.103834-1-clement.leger@bootlin.com> <20220224154040.2633a4e4@fixe.home> <2d3278ef-0126-7b93-319b-543b17bccdc2@redhat.com> <20220224174205.43814f3f@fixe.home> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le Thu, 24 Feb 2022 17:26:02 +0000, Mark Brown a =C3=A9crit : > On Thu, Feb 24, 2022 at 05:42:05PM +0100, Cl=C3=A9ment L=C3=A9ger wrote: > > Hans de Goede a =C3=A9crit : =20 >=20 > > > As Mark already mentioned the regulator subsystem has shown to > > > be a bit problematic here, but you don't seem to need that? =20 >=20 > > Indeed, I don't need this subsystem. However, I'm still not clear why > > this subsystem in particular is problematic. Just so that I can > > recognize the other subsystems with the same pattern, could you explain > > me why it is problematic ? =20 >=20 > ACPI has a strong concept of how power supply (and general critical > resources) for devices should be described by firmware which is very > different to that which DT as it is used in Linux has, confusing that > model would make it much harder for generic OSs to work with generic > ACPI systems, and makes it much easier to create unfortunate interactions > between bits of software expecting ACPI models and bits of software > expecting DT models for dealing with a device. Potentially we could > even run into issues with new versions of Linux if there's timing or > other changes. If Linux starts parsing the core DT bindings for > regulators on ACPI systems then that makes it more likely that system > integrators who are primarily interested in Linux will produce firmwares > that run into these issues, perhaps unintentionally through a "this just > happens to work" process. Ok that's way more clear. >=20 > As a result of this we very much do not want to have the regulator code > parsing DT bindings using the fwnode APIs since that makes it much > easier for us to end up with a situation where we are interpreting _DSD > versions of regulator bindings and ending up with people making systems > that rely on that. Instead the regulator API is intentional about which > platform description interfaces it is using. We could potentially have > something that is specific to swnode and won't work with general fwnode > but it's hard to see any advantages for this over the board file based > mechanism we have already, swnode offers less error detection (typoing > field names is harder to spot) and the data marshalling takes more code. Instead of making it specific for swnode, could we make it instead non working for acpi nodes ? Thus, the parsing would work only for swnode and device_node, not allowing to use the fwnode support with acpi for such subsystems (not talking about regulators here). If switching to board file based mechanism, this means that all drivers that are used by the PCIe card will have to be modified to support this mechanism. >=20 > fwnode is great for things like properties for leaf devices since those > are basically a free for all on ACPI systems, it allows us to quickly > and simply apply the work done defining bindings for DT to ACPI systems > in a way that's compatible with how APCI wants to work. It's also good > for cross device bindings that are considered out of scope for ACPI, > though a bit of caution is needed determining when that's the case. Ok got it, thanks for the in-depth explanations. --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com