Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5652155rwb; Tue, 17 Jan 2023 17:05:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtY+CSXexsnf4UzlFPzBrrGf5AMeiGk/86qj8mq49eXzXNZcin/CYTeP9WacurtxRkxQwiA X-Received: by 2002:a17:906:670b:b0:7c1:8f53:83a0 with SMTP id a11-20020a170906670b00b007c18f5383a0mr4789407ejp.13.1674003939376; Tue, 17 Jan 2023 17:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674003939; cv=none; d=google.com; s=arc-20160816; b=e0hdSCFeXAaFu/xtUgNF2KgNUh+kONI2KlY1quzDTvJyg8NzGNmR2VRxvEOy/GmlVl wLhXQL6cmB1Tae+3XJOF+O0QL7aFvbGSSL43Rc3Gteuh6LfFVs5LhTtSExFgOPc49wf6 1KpXm0c+SyCexR+8h+gPQfpwDmhZwuGK7GDQ5V0wrO5Gl70mIinDKOQxLb1UdMPdthDf uXIoKX7QgXlDirY2l3a3StRlDDjcR2Z5PYxPu6K52rWZmXXGpGMiWEW68Mkk+ELekkea GfC1oawxsxKHB15LJIGo3dAHE/UIXy5xdpBDG1P4cNZU/SwuZIcGkxhGZ3Tw51fEs62R 4Gjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0HCpBuDUlZrcaYoduPW/Z+1qpg8yIbgenbGVPx9MOfk=; b=mkpwGZILNZ8iLkDv0MLC/lMwGy3zzMKblR4/bW3GqtBzjchi9K2tacfZt1oBVvpRvb Frr8ERTfcF1eMctZ5oeflWuFoRBrHdQsDvTIkj3O0eLWOtIMEgwE0FAlOKHwGC0KloFV GH8JVS1VGwzvaRsMgF8hSngJF01W3SnJ1/DiqjGrnX1GK8YQBj7qwKE8y7eemZmhTjaz esw2RHnCmB3w2dw94c/TGm+rVrtsapOxDhB/+xXHgipAzRkKF6nWiPKlAbSpjTGwCcJw 3tRO2ubYMaShbKL7nxemflcoRuwdd3wANtLWR/O68NKp0sHNDEx3hQOv7P9pldv/YzEJ F2fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vVm8kryV; 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=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh16-20020a17090720f000b00877571a4f49si461767ejb.794.2023.01.17.17.05.28; Tue, 17 Jan 2023 17:05:39 -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=@lunn.ch header.s=20171124 header.b=vVm8kryV; 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=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229862AbjARAv5 (ORCPT + 46 others); Tue, 17 Jan 2023 19:51:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbjARAuO (ORCPT ); Tue, 17 Jan 2023 19:50:14 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EB948597; Tue, 17 Jan 2023 16:38:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=0HCpBuDUlZrcaYoduPW/Z+1qpg8yIbgenbGVPx9MOfk=; b=vV m8kryVeZkEM87hthlDf5125GXBr4uT2ZkjLFASwXfys3F2ONkUp9EskecwNpN7VRj3Sj/KSDpL8fT P90u4Q0CiTJIhrrwLW//dJIvE2InyPGwgK+0Tw8gKPqnt1lYMUlq/8So4Ta8zQ9FnghNrN3KWu6s2 brSv+//fMoHqXo0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pHwTR-002NcW-Ps; Wed, 18 Jan 2023 01:38:41 +0100 Date: Wed, 18 Jan 2023 01:38:41 +0100 From: Andrew Lunn To: Marcin Wojtas Cc: Vladimir Oltean , "Russell King (Oracle)" , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org, rafael@kernel.org, andriy.shevchenko@linux.intel.com, sean.wang@mediatek.com, Landen.Chao@mediatek.com, linus.walleij@linaro.org, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, hkallweit1@gmail.com, jaz@semihalf.com, tn@semihalf.com, Samer.El-Haj-Mahmoud@arm.com Subject: Re: [net-next: PATCH v4 2/8] net: mdio: switch fixed-link PHYs API to fwnode_ Message-ID: References: <20230116173420.1278704-1-mw@semihalf.com> <20230116173420.1278704-3-mw@semihalf.com> <20230116181618.2iz54jywj7rqzygu@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 On Tue, Jan 17, 2023 at 05:05:53PM +0100, Marcin Wojtas wrote: > Hi Andrew and Vladimir, > > pon., 16 sty 2023 o 23:04 Andrew Lunn napisaƂ(a): > > > > On Mon, Jan 16, 2023 at 08:16:18PM +0200, Vladimir Oltean wrote: > > > On Mon, Jan 16, 2023 at 05:50:13PM +0000, Russell King (Oracle) wrote: > > > > On Mon, Jan 16, 2023 at 06:34:14PM +0100, Marcin Wojtas wrote: > > > > > fixed-link PHYs API is used by DSA and a number of drivers > > > > > and was depending on of_. Switch to fwnode_ so to make it > > > > > hardware description agnostic and allow to be used in ACPI > > > > > world as well. > > > > > > > > Would it be better to let the fixed-link PHY die, and have everyone use > > > > the more flexible fixed link implementation in phylink? > > > > > > Would it be even better if DSA had some driver-level prerequisites to > > > impose for ACPI support - like phylink support rather than adjust_link - > > > and we would simply branch off to a dsa_shared_port_link_register_acpi() > > > function, leaving the current dsa_shared_port_link_register_of() alone, > > > with all its workarounds and hacks? I don't believe that carrying all > > > that logic over to a common fwnode based API is the proper way forward. > > In the past couple of years, a number of subsystems have migrated to a > more generic HW description abstraction (e.g. a big chunk of network, > pinctrl, gpio). ACPI aside, with this patchset one can even try to > describe the switch topology with the swnode (I haven't tried that > though). I fully agree that there should be no 0-day baggage in the > DSA ACPI binding (FYI the more fwnode- version of the > dsa_shared_port_validate_of() cought one issue in the WIP ACPI > description in my setup). On the other hand, I find fwnode_/device_ > APIs really helpful for most of the cases - ACPI/OF/swnode differences > can be hidden to a generic layer and the need of maintaining separate > code paths related to the hardware description on the driver/subsystem > level is minimized. It looks like we are heading towards three different descriptions. OF, ACPI and swnode. Each is likely to be different. OF has a lot of history in it, deprecated things etc, which should not appear in the others. So i see a big ugly block of code for the OF binding, and hopefully clean and tidy code for ACPI binding and a clean and tidy bit of code for swmode., It would be nice if the results of that parsing could be presented to the drivers in a uniform way, so the driver itself does not need to care where the information came from. But to me it is clear that this uniform layer has no direct access to the databases, since the database as are different. Andrew