Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp84832imn; Tue, 26 Jul 2022 23:45:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1siducm5p8UbbWgUv9MNmgSvsHHebQ7nfPxRlmm/6RwQ2jCGEbBYmtML/ZhB/aUUjPozZLf X-Received: by 2002:a63:470f:0:b0:419:aa0d:7c51 with SMTP id u15-20020a63470f000000b00419aa0d7c51mr17249400pga.482.1658904346578; Tue, 26 Jul 2022 23:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658904346; cv=none; d=google.com; s=arc-20160816; b=s772TPVpWeaJ/ok+OcWsNllEJJXats6L882MububqkOWEG1hGSPfAyDeD4je6lyAWf +7gjIFWeMv3LmequWVrinwSX8fxMlq6Ly9mykSmrUnoKvv/ierKdMJm/GsZMKNA8LKw+ fWe8TVlqJaqeV241lK6O5HpdoQNqIEKTXlQX5jnvALFswjv6r1jFhq3j6z48ZoUiX/xj dQJbvRqV18NIQmMA55nm1OTbDG6SgWYnqGjTvoVUki8ne9qmwJGTU+o7t9QrwlmaJRB4 nDD/oWbEaKxxQD2W+Z3g6cblK0lKOK1u9HEJEmossiO4OUQ4c/2mxkvBMtfHiqR/rs6J QRRg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Q0JdbbZEALmFTCXsfz74/9NIeFXKFHwfHwSewzxmkTY=; b=YPH/c9VlVJRjnmSAH6Wj3PBMY9WwrtBo3iAqLxXZwKrc32rFOSht/vTk/h+ivxoRJb HRQaAADYMvQi+rdgVzM7LnzMPOBx0UIj66THIQVJI6pVdzc28osETbynPeVEeLqEKZ53 qbNiGXTJiZdDjv+gV+tdPvFPnUZ6SQJyk02rVKYpkJ1ybZIWqC5IqZTvBMRpEK2i6AtK mlh+e+o8XsYQVMgcmjhivb8GqhI+tplktu7naJ3DmkMIG7I0CZ52DJqnG8lXJyHYJBi/ i2/gqcCY15pesilakVL99bKh4w4Oq80vLPKj5zB43N7h+zNG9dFKF/Y9gr47CVEoamN5 P/AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=et464ncc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020a631a56000000b0041a4c29e7a3si18225017pgm.272.2022.07.26.23.45.27; Tue, 26 Jul 2022 23:45:46 -0700 (PDT) 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=@semihalf.com header.s=google header.b=et464ncc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbiG0Gnp (ORCPT + 99 others); Wed, 27 Jul 2022 02:43:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbiG0Gnn (ORCPT ); Wed, 27 Jul 2022 02:43:43 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FDE7371B3 for ; Tue, 26 Jul 2022 23:43:40 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id m12so24655322lfj.4 for ; Tue, 26 Jul 2022 23:43:40 -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=Q0JdbbZEALmFTCXsfz74/9NIeFXKFHwfHwSewzxmkTY=; b=et464ncc41hVOY+Ln75ox4QXAf3bDhymWPXbtstVszSs6Gt3al0ovWXBjq0jDSLbwE kwgkaX3zH8PfMvs0Pi0XQlRmxJqV4BqJni9KaxJTKEwxLArGWLYKJu0xiwRmjBkmVbQr BjiQfLbjAdCK2r4/nj8umMCuvn8gfEs+/PVbPXL2mFlWdeh9aaf1CxOP/ZI8U2xIvAjh T9lJV2u9HosVf3Zmfgp8sLQkrpp2vDSbtNb7cYX4EfB6qGG/suZ2yu0nutMm2wNQ93RO ZwQjKX2+suuf12kajWbxg5XVnrJlFwy5SqXhEbOLMt9opL40afwIKrbQQD4fe2JRov1W mh/g== 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=Q0JdbbZEALmFTCXsfz74/9NIeFXKFHwfHwSewzxmkTY=; b=RenLt+xBB5fB78yL4ypYcEi2a3VriydYxV0RgEKh2qH4qLDJznV8MEeQXS/z1kOOLv Ka2+T73GKfexCTQDDJ76QDGSgt00kyo8lFjPujQ0EUUqhCFmpE7Eu0i8W0yC+ffPTcXv 83oZD+XWkKvzTXj46Zn9ioB8JO6dF4OLI7GtQIkduUwz7UfPUyoVBbsN1hhE2gN6E58/ 0PAPUHIbxcxPuWa1DLRENZwO8hlZfoiJZjqxzGBsOBpVmSo52/qMG9J12eZkLBKQRCT4 J8Mvsej47D4cZW03DmMEaFEL1ZHY7+gvu9MNWzsqDO2Yyyef9C/vQ42+Zd2ZGe95g4Mh tU8w== X-Gm-Message-State: AJIora9DpOnYAp2GHKabSlcB+UKti81YZYyJWvaFk+RewBHTv0Pt50fv nekN8E9eE4fyP7+bIUZaX6S+yYUBoSudTA== X-Received: by 2002:a05:6512:2314:b0:48a:2c31:d9cd with SMTP id o20-20020a056512231400b0048a2c31d9cdmr7766736lfu.491.1658904218229; Tue, 26 Jul 2022 23:43:38 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id w19-20020a05651234d300b0048a97a1df02sm1157231lfr.6.2022.07.26.23.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 23:43:37 -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 v3 0/8] DSA: switch to fwnode_/device_ Date: Wed, 27 Jul 2022 08:43:13 +0200 Message-Id: <20220727064321.2953971-1-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hi, This is a re-spin of the DSA migration to fwnode_/device_ API. It addresses all comments from the previous iteration - the details are summarized in the changelog section below. This time the patchset is based and tested on top of pure net-next/main branch. Each commit was checked on: * On EspressoBIN * On SolidRun CN913x CEx7 Eval Board Any comments or remarks will be appreciated. Best regards, Marcin Changelog v2 -> v3: 1/8: * Replace forward declaration s/device_node/fwnode_handle/ in include/linux/phy_fixed.h * Add Florian's RB * 3/8: * Extend lines width in the commit message. * While dropping dp->dn fields in the drivers, switch to fwnode_ API in the updated places. * 5/8: * Update routine name to fwnode_find_parent_dev_match() * Improve comment section * Move the definition adjacent to a group of fwnode APIs operating on parents 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_find_parent_dev_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 | 6 +- include/linux/property.h | 1 + include/net/dsa.h | 2 +- net/dsa/dsa_priv.h | 4 +- drivers/base/property.c | 23 ++++ drivers/net/dsa/mt7530.c | 6 +- drivers/net/dsa/mv88e6xxx/chip.c | 57 ++++----- drivers/net/dsa/qca/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 | 68 +++++------ net/dsa/slave.c | 7 +- 20 files changed, 329 insertions(+), 285 deletions(-) -- 2.29.0