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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54E7DC43334 for ; Fri, 15 Jul 2022 08:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232967AbiGOIut (ORCPT ); Fri, 15 Jul 2022 04:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231892AbiGOIus (ORCPT ); Fri, 15 Jul 2022 04:50:48 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C89A3823A7 for ; Fri, 15 Jul 2022 01:50:41 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id r9so6760097lfp.10 for ; Fri, 15 Jul 2022 01:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0L6cELyn7jvpoaX0deTVVc+dWskWPIjbhl9EKXQMb1o=; b=Kt8R6I1PuFUBffIBgqNZBnpQOYHhVItlnRTdxNrnr5lRw3hbimOCwO44clT2b2K000 kGLvEiYvFMDviW86zkrJrS1dUooT5Zqrq7QBFIo2QDSVf1a5Qgk3dOZFOfib8C75Qv2y iY42VXFxFqUZnULVf0GOlGIP7fho1/If41i+w81UOjqfLL8FeW1kQw4Xogm69g8WVV6n PZws8mg+tB3FgXthGdzkGPlUicJk1qVbIt+WA3axKUCeQ94F4YPY/jnnVAEOphUbdwJl 4VRD4QRacv730iubjTfAztBa4pG4rdCOGoY7HPLNLHZVMk9pHj6SC62GTm+gvn2DAvAs rfng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0L6cELyn7jvpoaX0deTVVc+dWskWPIjbhl9EKXQMb1o=; b=ebFcwMwuLt2drLxnvUcYRFTRSSwrtmU33N33L/eeoNkrxvC91xznPBn2UM+Nha8R7N SYFLoFO39r6ATkpCVKkRDPhyHIvPq+Au4oMBHZ2r2UkpR6JeuXLCnkqEGaEEAopJxV2d nosgnSwOq0/o3oidHjzX9dThIZDPBZojpDZMzMfvAhDpIp9+Cx/GBFZo/0T6tdXwSYug pL1yiMOyutcF+CZ3TywXeALKPMb/4jf5a0Uw15sfrx5z4K6ufEXy7oIA4Rj7vlclr0Pk TgX2hRr10pvLQhC7GIW/pQA+M3n8huq+YBL99rb7iUme++8A22iQmI/ixRpnWU9uz1pi 9TBg== X-Gm-Message-State: AJIora9cH6lnspT1P2sHQp/fIm5tgZO5cHFAG4LzfcC5HHoIf3SHdGa8 6B/kCELbTEDAZnYPuxcKtI345g== X-Google-Smtp-Source: AGRyM1vqKZl8Z6F8ovOnVdk5GvmZ1W9G+FpqJ213NmovMavpUEN59ihFQZtqiTv7PuPjA0WpGZcM9w== X-Received: by 2002:a05:6512:130f:b0:47f:bf0b:234 with SMTP id x15-20020a056512130f00b0047fbf0b0234mr7753030lfu.351.1657875040038; Fri, 15 Jul 2022 01:50:40 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id e4-20020a2e9e04000000b0025d773448basm667846ljk.23.2022.07.15.01.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 01:50:39 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org Cc: rafael@kernel.org, andriy.shevchenko@linux.intel.com, sean.wang@mediatek.com, Landen.Chao@mediatek.com, linus.walleij@linaro.org, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, hkallweit1@gmail.com, gjb@semihalf.com, mw@semihalf.com, jaz@semihalf.com, tn@semihalf.com, Samer.El-Haj-Mahmoud@arm.com, upstream@semihalf.com Subject: [net-next: PATCH v2 0/8] DSA: switch to fwnode_/device_ Date: Fri, 15 Jul 2022 10:50:04 +0200 Message-Id: <20220715085012.2630214-1-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi, This is a re-spin of the DSA migration to fwnode_/device_ API. As agreed, the ACPI-specific patches were kept aside for now, until the MDIOSerialBus is submitted and accepted in the ACPI Specification. The patchset addresses all comments from the first version, mostly related to usage of proper device_ helpers. Also, as it was suggested, fwnode_dev_node_match() routine was taken out of the network code and introduced as a generic one in drivers/base/property.c The details can be found in the changelog below. Any comments or remarks will be appreciated. Each patch was tested on: * On EspressoBIN * On SolidRun CN913x CEx7 Eval Board IMPORTANT NOTE: This patchset is rebased on top of the one from Russell (https://lore.kernel.org/all/Ys7RdzGgHbYiPyB1@shell.armlinux.org.uk/), so a care should be taken, when merging to the net-next tree. Best regards, Marcin Changelog v1->v2: 1/8 * Drop unnecessary check in fixed_phy_get_gpiod() * Improve line breaking * Use device_set_node & dev_fwnode 2/8 * Switch to fwnode_property_count_u32 and fix comparison in if statement. 3/8 * Drop dn usage entirely and use dp->fwnode only. Update all dependent drivers to use to_of_node. * Use device_set_node, dev_fwnode & device_get_named_child_node * Replace '_of' routines suffix with '_fw' 4/8 * Use device_set_node 5/8 * New patch 6/8 * Use device_match_fwnode * Restore EXPORT_SYMBOL() 7/8 * Get rid of of_mdiobus_register_device 8/8 * Use dev_fwnode in mv88e6xxx_probe * Simplify condition checks in mv88e6xxx_probe as suggested by Andy Marcin Wojtas (8): net: phy: fixed_phy: switch to fwnode_ API net: mdio: switch fixed-link PHYs API to fwnode_ net: dsa: switch to device_/fwnode_ APIs net: mvpp2: initialize port fwnode pointer device property: introduce fwnode_dev_node_match net: core: switch to fwnode_find_net_device_by_node() net: mdio: introduce fwnode_mdiobus_register_device() net: dsa: mv88e6xxx: switch to device_/fwnode_ APIs include/linux/etherdevice.h | 1 + include/linux/fwnode_mdio.h | 22 ++++ include/linux/of_net.h | 6 - include/linux/phy_fixed.h | 4 +- include/linux/property.h | 2 + include/net/dsa.h | 2 +- net/dsa/dsa_priv.h | 4 +- drivers/base/property.c | 22 ++++ drivers/net/dsa/mt7530.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 57 ++++----- drivers/net/dsa/qca8k.c | 2 +- drivers/net/dsa/realtek/rtl8365mb.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- drivers/net/mdio/fwnode_mdio.c | 129 ++++++++++++++++++++ drivers/net/mdio/of_mdio.c | 111 +---------------- drivers/net/phy/fixed_phy.c | 39 +++--- net/core/net-sysfs.c | 25 ++-- net/dsa/dsa2.c | 101 ++++++++------- net/dsa/port.c | 70 ++++++----- net/dsa/slave.c | 7 +- 20 files changed, 328 insertions(+), 282 deletions(-) -- 2.29.0