Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp448203pxb; Thu, 12 Nov 2020 07:42:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJySDwJP+u+Qu146mpGxOYqmnpdvIZqHhvnyrLOeZLynvcO73Nr//y8pLP34zbdX6DwLYwHz X-Received: by 2002:a17:906:46d5:: with SMTP id k21mr23861782ejs.495.1605195740861; Thu, 12 Nov 2020 07:42:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605195740; cv=none; d=google.com; s=arc-20160816; b=RNoexkp/5FUU0u1EPCoq6e6uiyuMM0Mi68P4fZXEVn4YVO5p0hlRihFFsUb0oB3Ck9 KjwOmztkmE+zxVh4Y/6mbHS2q6kRF6HOfrANfL0hCnVyPbtuA1kpDwJI8M5tk8WBBTf8 q9Rh5gT/iyFMH9TRrrGvBoHn5iSXqsv8/4OEwpjwotra87oXg6slxU0nbxdwXySj+F7p oc5JLOKQFx3jMBynUo8CD+AL2tXB2pEmxSeZxJm/wZIcjAf4s+driBl/p96U8tof+1Mt La42HELK+dSyB5TpHXwpAPWpY3cnqHk/AafkYycgurn83/O+K/46h6BJYNWRf82XDcmR i9aw== 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=NW7k+fc9Rrx8H7sTSfkdc0jwlTP8TX6dsEEGMNsNYZo=; b=NqPBv+9PNC7A+KdM7CiTlaA0e+tXtDah7tmcVScrSf5QqueTJfHKgBYGYkqmfZhy4f imuvAj3ZVnJ1tCddeaApYvN5BbvyHvfpXwyqAyGd2d+MkOypD7dCRV0nSyXSkkgaDzot iCujQVl2Z2GAY/ciD+13zGuXcpYHHBqnbdMGbwQN0QE+D8f9E8u6wZ894SOjACphCOPr VuqruMws4XLbiHj5ORtj02ozWCpIvN2aLMr7VT7DP8hrA+Z+NkQotI4rOLkG8LWojHnb Z77qkEVIKFCEs+RD62Drx0ZljL6HP96a3c+Sm1Qsjj7YaSk7TJ4DmG4+I9akHYnLOzM1 1jGw== 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 g20si3781688eje.577.2020.11.12.07.41.56; Thu, 12 Nov 2020 07:42:20 -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 S1728671AbgKLPkc (ORCPT + 99 others); Thu, 12 Nov 2020 10:40:32 -0500 Received: from mailout11.rmx.de ([94.199.88.76]:41957 "EHLO mailout11.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728238AbgKLPkb (ORCPT ); Thu, 12 Nov 2020 10:40:31 -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 mailout11.rmx.de (Postfix) with ESMTPS id 4CX5Qf07Mkz41tQ; Thu, 12 Nov 2020 16:40:26 +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 4CX5P42lMnz2xGC; Thu, 12 Nov 2020 16:39:04 +0100 (CET) Received: from N95HX1G2.wgnetz.xx (192.168.54.59) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 12 Nov 2020 16:37:01 +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 v2 02/11] net: dsa: microchip: support for "ethernet-ports" node Date: Thu, 12 Nov 2020 16:35:28 +0100 Message-ID: <20201112153537.22383-3-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201112153537.22383-1-ceggers@arri.de> References: <20201112153537.22383-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.59] X-RMX-ID: 20201112-163904-4CX5P42lMnz2xGC-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 --- 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