From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BC1F2D8DA9; Tue, 26 Aug 2025 23:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756249594; cv=none; b=OPAY4LqOV3veMmScMQCqs5JVlgoiIdVsydRrLipflBcZZnticdnxL5VzKKTbVOGDlb5G0/SKCtwMHRaTooPUWQUfki278M4s5qPWd4ndw+6sLjmLiZIMbs+WAqdAQs9c5YNixmzV6dFAL3S9tCiT+hH25Gn9+8ab2g3ayZOErPE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756249594; c=relaxed/simple; bh=gPW8/s2OSqyRhSLj9Ov1snpbX2gPu55ctTsANI6JoUM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OeuMaf94sx1SCay/ZGUl2e90oRpw3aK6Z0ODqUMT41xDgXizzjmb9g0oPXlgYepcCgiZDp7ywUh5yVVcT6LdGxTpxUYoX9e7Lt19mM83L28WsZu05AKRv7eu7dGCuIcje9HPdZMrE9lQfF6Yrn2/XWKRjpngs+pgRcsG1XExEaQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98.2) (envelope-from ) id 1ur2kG-000000001to-1ACB; Tue, 26 Aug 2025 23:06:28 +0000 Date: Wed, 27 Aug 2025 00:06:24 +0100 From: Daniel Golle To: Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Hauke Mehrtens , Russell King , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Andreas Schirm , Lukas Stockmann , Alexander Sverdlin , Peter Christen , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: [PATCH net-next v2 5/6] net: dsa: lantiq_gswip: support standard MDIO node name Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Instead of matching against the child node's compatible string also support locating the node of the device tree node of the MDIO bus in the standard way by referencing the node name ("mdio"). Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Reviewed-by: Alexander Sverdlin --- v2: no changes drivers/net/dsa/lantiq/lantiq_gswip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/lantiq/lantiq_gswip.c b/drivers/net/dsa/lantiq/lantiq_gswip.c index 64e378852284..9fd5e5938384 100644 --- a/drivers/net/dsa/lantiq/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq/lantiq_gswip.c @@ -286,6 +286,9 @@ static int gswip_mdio(struct gswip_priv *priv) int err = 0; mdio_np = of_get_compatible_child(switch_np, "lantiq,xrx200-mdio"); + if (!mdio_np) + mdio_np = of_get_child_by_name(switch_np, "mdio"); + if (!of_device_is_available(mdio_np)) goto out_put_node; -- 2.51.0