Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp616949pxb; Wed, 18 Nov 2020 12:39:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWL9uabUDorVKZjw5CXKbHxdC7sdR+uef8KknnAMPrQs2bX6c2yaBnp7QHRJYdz9Tdq0D0 X-Received: by 2002:a17:906:3547:: with SMTP id s7mr24762205eja.70.1605731994685; Wed, 18 Nov 2020 12:39:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605731994; cv=none; d=google.com; s=arc-20160816; b=YdQx6pv8671TwQJB7Mo1UBO7fgwRDXOmLZfD8xCnfSXp1XBr+MocZgR/qBssFizjh1 GmKmROdmmbs0snb1yxXS9Pz6cCCknfZlW+25JIy/TQ4wIKv6YTwOB+qby62BlB3w0/np 4BKntk+xVZAKETztVGxaVXdUEXwNvQK1Uq6H+Dl4TgV9h3wd8cgZhpQLaiwMASHfwRTH d/qhLlbO7TW4H4JEn/gbRFqrmeDTEWsVt/pnKZabjxY6Us+0Wd/vMusRr7TTv/UJCMmn 8n4TTLQnrSWB7YsRinwD/JQV9R6L/DEqJt+v1vd6xuq/yH8ZsokTSnGi79EOYDFakflE SCug== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nml//N7IsDoCGRDNDl/em4+I+Bf4WwVoR305+cMQ2ZY=; b=cDfc73WYj7MERMpSv7b8wQ/IzeVOyOr3qhP9Anh5YJKJT00MKWUINHvC1ZR6TVBmbp UrAHpxj84RjovpMZcIvufL9rsY6Sqf8A3pSbPdj4wJOZjGL1WsnsSH9mFEtnZawPsVSf gKNE48yAOFQ+9URg+5hzonSNMELS4AoO3CMFbPG/XrkplZgBUEQ0Mgq60BFE2a4QbBEu xkivmJaH9JwJSN2j8I2+5U1f719K8MHtIV1WAr1M8/DHMyB3mpA8atqKUSmworgI6k1f RBvik8RBLSK2Aoy5EyRD+/rqf/LDJfBXsxGdAPc4UuBggP+EXSgsFNfU5Ni9MFLVwlm1 vx4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si186618edy.320.2020.11.18.12.39.31; Wed, 18 Nov 2020 12:39:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726979AbgKRUea (ORCPT + 99 others); Wed, 18 Nov 2020 15:34:30 -0500 Received: from mailout01.rmx.de ([94.199.90.91]:47160 "EHLO mailout01.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbgKRUea (ORCPT ); Wed, 18 Nov 2020 15:34:30 -0500 Received: from kdin01.retarus.com (kdin01.dmz1.retloc [172.19.17.48]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout01.rmx.de (Postfix) with ESMTPS id 4Cbvg50sVxz2SVdJ; Wed, 18 Nov 2020 21:34:25 +0100 (CET) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin01.retarus.com (Postfix) with ESMTPS id 4CbvdX1kKvz2xD8; Wed, 18 Nov 2020 21:33:04 +0100 (CET) Received: from N95HX1G2.wgnetz.xx (192.168.54.25) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 18 Nov 2020 21:31:32 +0100 From: Christian Eggers To: Vladimir Oltean , Jakub Kicinski , Andrew Lunn , Richard Cochran , "Rob Herring" CC: Vivien Didelot , "David S . Miller" , Kurt Kanzenbach , George McCollister , Marek Vasut , Helmut Grohne , Paul Barker , Codrin Ciubotariu , Tristram Ha , Woojung Huh , Microchip Linux Driver Support , Christian Eggers , , , Subject: [PATCH net-next v3 02/12] net: dsa: microchip: support for "ethernet-ports" node Date: Wed, 18 Nov 2020 21:30:03 +0100 Message-ID: <20201118203013.5077-3-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201118203013.5077-1-ceggers@arri.de> References: <20201118203013.5077-1-ceggers@arri.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.54.25] X-RMX-ID: 20201118-213308-4CbvdX1kKvz2xD8-0@kdin01 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and "ports". Signed-off-by: Christian Eggers Reviewed-by: Vladimir Oltean --- drivers/net/dsa/microchip/ksz_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 71cd1828e25d..a135fd5a9264 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -427,7 +427,9 @@ int ksz_switch_register(struct ksz_device *dev, ret = of_get_phy_mode(dev->dev->of_node, &interface); if (ret == 0) dev->compat_interface = interface; - ports = of_get_child_by_name(dev->dev->of_node, "ports"); + ports = of_get_child_by_name(dev->dev->of_node, "ethernet-ports"); + if (!ports) + ports = of_get_child_by_name(dev->dev->of_node, "ports"); if (ports) for_each_available_child_of_node(ports, port) { if (of_property_read_u32(port, "reg", -- Christian Eggers Embedded software developer Arnold & Richter Cine Technik GmbH & Co. Betriebs KG Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918 Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477 Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler