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 X-Spam-Level: X-Spam-Status: No, score=-1.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43341C48BE0 for ; Fri, 11 Jun 2021 09:17:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28906613D0 for ; Fri, 11 Jun 2021 09:17:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbhFKJTs (ORCPT ); Fri, 11 Jun 2021 05:19:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231366AbhFKJTs (ORCPT ); Fri, 11 Jun 2021 05:19:48 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93BC5C061574; Fri, 11 Jun 2021 02:17:36 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id og14so3538292ejc.5; Fri, 11 Jun 2021 02:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tT/Yhme4HpUxJW8MmdpDHTWwIDpMbpzEcGbpZ+AnSGE=; b=oqrGz3C4XTzBWyPPlCOe7wKQomXhQCEyJTjuBZuI5ImLQ3TJD4Vh/LWqTMpeJ9iQXm 4z++kNx0JE0vNMMXFfs6ozDm+zULaVpgIlZlb4zwvkrSeoIGtSiM1DYZu4PWz2Cr0wSm iB7LMHcATjL+sRL/4cnQVBXvLnnnyyPCjZBojIRZ4/tqldOsJaae+EZtMYIoOu7ddbtC +uiWcGCT0p5NbuBNhAQ+HsCUWyqmStS2JTVxA0h7pkXH331RNXNmjCwyTrLdsaHCeEmE lj8BMQw5Y4VBsEnDXusm65/nFHwQgwQhuvhtfPfkbZd6xMr+xTsqkhyTZn/G6m3Fxso4 CxDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tT/Yhme4HpUxJW8MmdpDHTWwIDpMbpzEcGbpZ+AnSGE=; b=csIJG5+u+NjhwHCJORE3kdP+ouvIUvcWomY58m2agGnAbltOWIf22NZaQiImy8Kfgz hdHsCLVUMCtbiheE2hjG5DXp+iENnWzmqORmPBAVJlnl+LuDk9gMt19C0uycI8LJ22rV UqBn/id2vC4i+c/kD/C1uZzIhZV5zkqlnB2TZA9a4clKBtU4s00IvCoAEIdL1gBKbTDj pUVDiapEuNkHbJAnJe1qwtX0D3plpXo/1FOdCMBQsIr7Yc/V42Ue6WRblLGhlRQJZ5lj S/W0af7QEBBSOf7Uzz6Ov8gNk6vlH7A8HWazUkwvPJ+QrKDpOfjmrf2nzDCaU+CND1CD v+Yw== X-Gm-Message-State: AOAM533pU/YELcdlJH/adjp8UPqU1dn7+w3fRUBAcn7sJu5PTxDttXJT Bte6TyHLXImmHIPUJS7LbqE= X-Google-Smtp-Source: ABdhPJxL1EBhK72LCCLBXOmmSrmvpfplT+xDm4HCNYeQEmXEWq0ih+Xhk9nUoE0D3oE45Uf22v7chQ== X-Received: by 2002:a17:906:c010:: with SMTP id e16mr2793715ejz.214.1623403055047; Fri, 11 Jun 2021 02:17:35 -0700 (PDT) Received: from skbuf ([188.26.52.84]) by smtp.gmail.com with ESMTPSA id dy19sm2337908edb.68.2021.06.11.02.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 02:17:34 -0700 (PDT) From: Ioana Ciornei X-Google-Original-From: Ioana Ciornei Date: Fri, 11 Jun 2021 12:17:32 +0300 To: Andy Shevchenko Cc: Ioana Ciornei , Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Florian Fainelli , Russell King - ARM Linux admin , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap , Calvin Johnson , Cristi Sovaiala , Florin Laurentiu Chiculita , Madalin Bucur , linux-arm Mailing List , Diana Madalina Craciun , ACPI Devel Maling List , Linux Kernel Mailing List , "linux.cj" , netdev , Laurentiu Tudor , Len Brown , "Rafael J . Wysocki" , Ioana Ciornei Subject: Re: [PATCH net-next v8 00/15] ACPI support for dpaa2 driver Message-ID: <20210611091732.wms3g3mnghvmcw3n@skbuf> References: <20210610163917.4138412-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Fri, Jun 11, 2021 at 12:00:02PM +0300, Andy Shevchenko wrote: > On Thu, Jun 10, 2021 at 7:40 PM Ioana Ciornei wrote: > > > > From: Ioana Ciornei > > > > This patch set provides ACPI support to DPAA2 network drivers. > > > > It also introduces new fwnode based APIs to support phylink and phy > > layers > > Following functions are defined: > > phylink_fwnode_phy_connect() > > fwnode_mdiobus_register_phy() > > fwnode_get_phy_id() > > fwnode_phy_find_device() > > device_phy_find_device() > > fwnode_get_phy_node() > > fwnode_mdio_find_device() > > acpi_get_local_address() > > > > First one helps in connecting phy to phylink instance. > > Next three helps in getting phy_id and registering phy to mdiobus > > Next two help in finding a phy on a mdiobus. > > Next one helps in getting phy_node from a fwnode. > > Last one is used to get local address from _ADR object. > > > > Corresponding OF functions are refactored. > > In general it looks fine to me. What really worries me is the calls like > > of_foo -> fwnode_bar -> of_baz. > > As I have commented in one patch the idea of fwnode APIs is to have a > common ground for all resource providers. So, at the end it shouldn't > be a chain of calls like above mentioned. Either fix the name (so, the > first one will be in fwnode or device namespace) or fix the API that > it will be fwnode/device API. These types of cyclic calls do not exist anymore. The fwnode_mdio does not call back into of_mdio but instead it directly implements any necessary operations using the fwnode_handle. The only calls happening are 'of_mdio -> fwnode_mdio' so that we leverage the common fwnode handling and do not duplicate code. Ioana