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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 64338C433DB for ; Mon, 8 Feb 2021 16:23:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00B4664E5D for ; Mon, 8 Feb 2021 16:23:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232820AbhBHQWb (ORCPT ); Mon, 8 Feb 2021 11:22:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234346AbhBHQWV (ORCPT ); Mon, 8 Feb 2021 11:22:21 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90DE9C061788; Mon, 8 Feb 2021 08:21:40 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id l18so9065027pji.3; Mon, 08 Feb 2021 08:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FwkWha3g7oAGpB4ws7tQE2d1Ep3IiBneyrvjPgo+ZlY=; b=c0r5N8jxVF6gKwrWgIFk8pzpa5inqJJ8IxXFim69z2u09lU41usZE+nCWufo8wzGbX xQGTDDnnAMsMXQm4FA2+T7yT8T1Na/dsKGh9ru3rKRUcNdTBa+DnwhHcePl67AGtIvNe fpKd1YiEuHmTv5UkLgVVYWCXVlNkOIn++vtiXyisvc7woTn4YLg3U1YENvqFW33tfkZN VJv/o7M3bNp6zDQeKw6ksavdZKHzZo2ehclHD4qqHJPCrweuWN4ikyFN7aWYEJQwWyKF dZ0DgxYyplPOGOLf85OWqLj64XccoT2gZzJDqgjGiX9JoCGzmkIM+kfKjL6JURNQJeMF FNMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FwkWha3g7oAGpB4ws7tQE2d1Ep3IiBneyrvjPgo+ZlY=; b=QcFgnZx7oEXV5Zd4qAd+YxNHmEvsiNj64X4wVAjm6NA02yHqu2kDQGWaRFSbfKFAWT oFdbYCdBw1YlxqjyrdiJLEwyxJ83YMGA5fbf5PiI1gXoOSxVLuTjkfWRBXm+c7otgSmv XIZpqvcABpyMAI05Q+gve0vGs8BTEFvGIDIQPodqay4XSQlTg/TGxPezCjJlgD+nJNtx 97pYDdP8UuNEQYtBcL4lMxcf52Tat3SQ6IOW2F0zkgQ4JvARpLMdMokJtoaPnQneTN0K WGu+5f8JaixnFylUF9/oLgkz+zbTCT5kJO3cHpHW9W/WrZZBZpRDPfNKeZtCWluzeTnG mHjg== X-Gm-Message-State: AOAM5308OJ4WCChoaZZaaAPw2N0C1Xr3RG3Nyj3QBe/setfJWvpi7k9I W7S/3xuP9b/lODU7CXVe7qwFm0oe8P+k3VChYUU= X-Google-Smtp-Source: ABdhPJzb6rIZJDKS/VoraARCNlcsJfBDoL00x231IpA5pGuxpSRJ5AtRSTI37rFBU7VtykBXo28JwAtQX5qXW9rTlBo= X-Received: by 2002:a17:90a:644a:: with SMTP id y10mr18283260pjm.129.1612801300072; Mon, 08 Feb 2021 08:21:40 -0800 (PST) MIME-Version: 1.0 References: <20210208151244.16338-1-calvin.johnson@oss.nxp.com> <20210208151244.16338-16-calvin.johnson@oss.nxp.com> In-Reply-To: <20210208151244.16338-16-calvin.johnson@oss.nxp.com> From: Andy Shevchenko Date: Mon, 8 Feb 2021 18:21:22 +0200 Message-ID: Subject: Re: [net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver To: Calvin Johnson Cc: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap , Laurentiu Tudor , Linux Kernel Mailing List , "linux.cj" , Diana Madalina Craciun , netdev , linux-arm Mailing List , ACPI Devel Maling List , "David S. Miller" , Ioana Radulescu , Jakub Kicinski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Mon, Feb 8, 2021 at 5:15 PM Calvin Johnson wrote: > > Modify dpaa2_mac_connect() to support ACPI along with DT. > Modify dpaa2_mac_get_node() to get the dpmac fwnode from either > DT or ACPI. > > Replace of_get_phy_mode with fwnode_get_phy_mode to get > phy-mode for a dpmac_node. > > Use helper function phylink_fwnode_phy_connect() to find phy_dev and > connect to mac->phylink. ... > + if (is_of_node(dev->parent->fwnode)) { > + dpmacs = of_find_node_by_name(NULL, "dpmacs"); > + if (!dpmacs) > + return NULL; > + parent = of_fwnode_handle(dpmacs); > + } else if (is_acpi_node(dev->parent->fwnode)) { > + parent = dev->parent->fwnode; dev_fwnode(dev->parent) ? > + } ... > + if (err) { > continue; > + } else if (id == dpmac_id) { Useless 'else' > + if (is_of_node(dev->parent->fwnode)) dev_fwnode() ? > + of_node_put(dpmacs); > + return child; > + } ... > + if (is_of_node(dev->parent->fwnode)) Ditto ? > + of_node_put(dpmacs); -- With Best Regards, Andy Shevchenko 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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 0E533C433DB for ; Mon, 8 Feb 2021 16:22:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A70564E87 for ; Mon, 8 Feb 2021 16:22:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A70564E87 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W+ChWJsOaEtJVKfuuelv6ECrAV5FDA0+Bgl27MyBkbs=; b=iSX50IO/c9IfuuVyvphwSW2rQ S2sKOV2TF9dFQQosld4AMIJUlQ41z2y3hw76NOsDxjghPUhF5FCxtoCny7cFu97UpZZuGvIKfagrO ji2Fx0PxW/BK5gnSQTvzL9Fkm6Vd1Ltjcon1p7RYv9c+FkmkLtqL8/l/8KI7WQi33SdLGAxh4LpVC W22F5nnTGrut7hPsQAh07RTr521TS79FEqoKDel/uMFAu2rqxqN5cgUVnD/sWJ18JmeF+YiTe4uII LrftiUZ2tOKPWtE1sFHYB+klJltvE7NS9ruU39VuNwYnq371E5zSJ2/m6TrwOkT8CMkikxWtSQ1SR esFJYTZJA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l99II-0007Kv-3S; Mon, 08 Feb 2021 16:21:46 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l99IE-0007JX-1R for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2021 16:21:43 +0000 Received: by mail-pj1-x1034.google.com with SMTP id cv23so1127174pjb.5 for ; Mon, 08 Feb 2021 08:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FwkWha3g7oAGpB4ws7tQE2d1Ep3IiBneyrvjPgo+ZlY=; b=c0r5N8jxVF6gKwrWgIFk8pzpa5inqJJ8IxXFim69z2u09lU41usZE+nCWufo8wzGbX xQGTDDnnAMsMXQm4FA2+T7yT8T1Na/dsKGh9ru3rKRUcNdTBa+DnwhHcePl67AGtIvNe fpKd1YiEuHmTv5UkLgVVYWCXVlNkOIn++vtiXyisvc7woTn4YLg3U1YENvqFW33tfkZN VJv/o7M3bNp6zDQeKw6ksavdZKHzZo2ehclHD4qqHJPCrweuWN4ikyFN7aWYEJQwWyKF dZ0DgxYyplPOGOLf85OWqLj64XccoT2gZzJDqgjGiX9JoCGzmkIM+kfKjL6JURNQJeMF FNMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FwkWha3g7oAGpB4ws7tQE2d1Ep3IiBneyrvjPgo+ZlY=; b=UhiYm+Mxuziy09MnXg3nLnYzspPwcX6+xeBBS/D40uPK91Ter3pSzUepu1dvp+ikKs FG06khVAy4HU4trmGVFYvByHUvKjnS745NGJL/70l0NNKYpPajmb9Md4PR50z+s+0OJN AihpPgqkS1hcGuz1gqkorRLtXP+/JDaK0sHt7wD9tTYDx9kjql71rcPfLlaubIr5MCG2 9gKeYM3L+u7AG4sbw9OpbBBOwOaaakNHkzphd4g6G7Ghboc+yGdLBioAk5HxWZe1ro+3 kVFCTdKZ4Jwx1Hl9mgVEbOHIIv6kyFFA05pd64eRfINhl21gh2R+hBdt6S/nOiQcuosz cW6w== X-Gm-Message-State: AOAM532DbosE3G2xUrrQzW7bxIC2mnCsP1vY7laT84QBzVC7qrzSdyg4 b+aKXHQ0xyy2vPviOZ+9KP6Ws+lXQrfLcnkRv94= X-Google-Smtp-Source: ABdhPJzb6rIZJDKS/VoraARCNlcsJfBDoL00x231IpA5pGuxpSRJ5AtRSTI37rFBU7VtykBXo28JwAtQX5qXW9rTlBo= X-Received: by 2002:a17:90a:644a:: with SMTP id y10mr18283260pjm.129.1612801300072; Mon, 08 Feb 2021 08:21:40 -0800 (PST) MIME-Version: 1.0 References: <20210208151244.16338-1-calvin.johnson@oss.nxp.com> <20210208151244.16338-16-calvin.johnson@oss.nxp.com> In-Reply-To: <20210208151244.16338-16-calvin.johnson@oss.nxp.com> From: Andy Shevchenko Date: Mon, 8 Feb 2021 18:21:22 +0200 Message-ID: Subject: Re: [net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver To: Calvin Johnson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210208_112142_179228_57AEF056 X-CRM114-Status: GOOD ( 16.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Heikki Krogerus , "Rafael J . Wysocki" , Grant Likely , Ioana Ciornei , Florian Fainelli , Saravana Kannan , Jon , Russell King - ARM Linux admin , Diana Madalina Craciun , ACPI Devel Maling List , Jakub Kicinski , Florin Laurentiu Chiculita , Madalin Bucur , Pieter Jansen Van Vuuren , Marcin Wojtas , linux-arm Mailing List , Laurentiu Tudor , Ioana Radulescu , netdev , Randy Dunlap , Linux Kernel Mailing List , Jeremy Linton , Cristi Sovaiala , "linux.cj" , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 8, 2021 at 5:15 PM Calvin Johnson wrote: > > Modify dpaa2_mac_connect() to support ACPI along with DT. > Modify dpaa2_mac_get_node() to get the dpmac fwnode from either > DT or ACPI. > > Replace of_get_phy_mode with fwnode_get_phy_mode to get > phy-mode for a dpmac_node. > > Use helper function phylink_fwnode_phy_connect() to find phy_dev and > connect to mac->phylink. ... > + if (is_of_node(dev->parent->fwnode)) { > + dpmacs = of_find_node_by_name(NULL, "dpmacs"); > + if (!dpmacs) > + return NULL; > + parent = of_fwnode_handle(dpmacs); > + } else if (is_acpi_node(dev->parent->fwnode)) { > + parent = dev->parent->fwnode; dev_fwnode(dev->parent) ? > + } ... > + if (err) { > continue; > + } else if (id == dpmac_id) { Useless 'else' > + if (is_of_node(dev->parent->fwnode)) dev_fwnode() ? > + of_node_put(dpmacs); > + return child; > + } ... > + if (is_of_node(dev->parent->fwnode)) Ditto ? > + of_node_put(dpmacs); -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel