From nobody Thu Dec 18 00:23:46 2025 Received: from mxout3.routing.net (mxout3.routing.net [134.0.28.8]) (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 A3C2828382; Thu, 1 May 2025 13:04:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104670; cv=none; b=KAdehKBOWdXojxSkJtUzoTIVrhTUocL65ffxxhyFfwb8BbhRQpvd3XtHKmaGa+6bRxSpMYS6mGmn+y4qEkexKZH0+Vx4SvVk8ssp9h3C3HAmaR1sjsxMCoBGVgyVolaP0nKEcf9Y9kSEx8M+vIlC71jizxHHnN3HiYGCgkASul4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104670; c=relaxed/simple; bh=MgJzVTP/cmGsc8FpUL9vgTr7SZhBLDFjvlBJd4Hi6Ok=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=axPgIggrPRznc/BjHhGdW19Ga8nClTTbsLviZcLm+bf4q5JHSw6DnGSjiniXYBhEyXyOXPSO+1a5ojJDEbEAtWnsWutFw6Cha1llNe53Q6dAbePtE+4pymTXEFwICvnBxifT2mE0GehUAmV7EaRR0zsI6nNBcEzqRi4HXFn6kqo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=iWXRWv1e; arc=none smtp.client-ip=134.0.28.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="iWXRWv1e" Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout3.routing.net (Postfix) with ESMTP id DDC836047C; Thu, 1 May 2025 12:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1746104242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NnoUbMfttFzwRrbX8cLNmCp9Iqdu1NA79G+j70FEH9Y=; b=iWXRWv1eeaVcFFtQWWjrMohgOyUY6glLempu1AWxYbDqZ0zfcmH6k+H/xjEsKgFBTTKU8I guqoMJkRD5pV/BrwkReJMVWQZjXfX9601Ngplj8RKXIgC8+7UEB6WjmV3rcNd/qXfyaPCK Bw6hf2KJsL6csJxH9y+3ZijsFzA5gHw= Received: from frank-u24.. (fttx-pool-157.180.225.138.bambit.de [157.180.225.138]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id A245D10010F; Thu, 1 May 2025 12:57:20 +0000 (UTC) From: Frank Wunderlich To: Daniel Golle , Qingfang Deng , SkyLake Huang , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno Cc: Frank Wunderlich , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [RFC,net-next v1] net: phy: mediatek: do not require syscon compatible for pio property Date: Thu, 1 May 2025 14:57:02 +0200 Message-ID: <20250501125703.55224-1-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 7d9196f7-2e8a-481a-ba32-0e3d88cab2b5 Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Current implementation requires syscon compatible for pio property which is used for driving the switch leds on mt7988. Replace syscon_regmap_lookup_by_phandle with of_parse_phandle and device_node_to_regmap to get the regmap already assigned by pinctrl driver. Signed-off-by: Frank Wunderlich --- drivers/net/phy/mediatek/mtk-ge-soc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/mediatek/mtk-ge-soc.c b/drivers/net/phy/mediat= ek/mtk-ge-soc.c index 175cf5239bba..21975ef946d5 100644 --- a/drivers/net/phy/mediatek/mtk-ge-soc.c +++ b/drivers/net/phy/mediatek/mtk-ge-soc.c @@ -7,6 +7,7 @@ #include #include #include +#include =20 #include "../phylib.h" #include "mtk.h" @@ -1319,6 +1320,7 @@ static int mt7988_phy_probe_shared(struct phy_device = *phydev) { struct device_node *np =3D dev_of_node(&phydev->mdio.bus->dev); struct mtk_socphy_shared *shared =3D phy_package_get_priv(phydev); + struct device_node *pio_np; struct regmap *regmap; u32 reg; int ret; @@ -1336,7 +1338,13 @@ static int mt7988_phy_probe_shared(struct phy_device= *phydev) * The 4 bits in TPBANK0 are kept as package shared data and are used to * set LED polarity for each of the LED0. */ - regmap =3D syscon_regmap_lookup_by_phandle(np, "mediatek,pio"); + pio_np =3D of_parse_phandle(np, "mediatek,pio", 0); + if (!pio_np) + return -ENODEV; + + regmap =3D device_node_to_regmap(pio_np); + of_node_put(pio_np); + if (IS_ERR(regmap)) return PTR_ERR(regmap); =20 --=20 2.43.0