From nobody Sun Feb 8 21:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 348C6C7EE24 for ; Mon, 15 May 2023 19:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245013AbjEOT7f (ORCPT ); Mon, 15 May 2023 15:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243501AbjEOT7e (ORCPT ); Mon, 15 May 2023 15:59:34 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1085658D for ; Mon, 15 May 2023 12:59:31 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34FJxO41053692; Mon, 15 May 2023 14:59:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1684180764; bh=ZMmu+Jtm+xCqgH0l6TlKmPYujrA59t9EtYDFwsokG04=; h=From:To:CC:Subject:Date; b=rr5h/hQX+ekYn7BB4x4Osx2Ojjg0N5sq7Mvj3ZI7Xkm2bQ0YhjJ058Z1uxRi9MFxt OlOv0m+562OQNvLuCClXxrtu+AcuyDSxU1Dgw+O+64hqgxSiHgSGPYSew1FZ2O5oif HUTuv1PC9Ub9mpc7o/1rKi3V16+wqlCf+HDsLM8s= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34FJxO4S065727 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 May 2023 14:59:24 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 15 May 2023 14:59:23 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 15 May 2023 14:59:23 -0500 Received: from fllv0039.itg.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34FJxNP9016442; Mon, 15 May 2023 14:59:23 -0500 From: Andrew Davis To: Vinod Koul , Kishon Vijay Abraham I , Siddharth Vadapalli , Roger Quadros CC: , , Andrew Davis Subject: [PATCH] phy: ti: gmii-sel: Allow parent to not be syscon node Date: Mon, 15 May 2023 14:59:22 -0500 Message-ID: <20230515195922.617243-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" If the parent node is not a syscon type, then fallback and check if we can get a regmap from our own node. This no longer forces us to make the parent of this node a syscon node when that might not be appropriate. Signed-off-by: Andrew Davis --- drivers/phy/ti/phy-gmii-sel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c index 8c667819c39a..1e67ed9a5cf6 100644 --- a/drivers/phy/ti/phy-gmii-sel.c +++ b/drivers/phy/ti/phy-gmii-sel.c @@ -435,9 +435,12 @@ static int phy_gmii_sel_probe(struct platform_device *= pdev) =20 priv->regmap =3D syscon_node_to_regmap(node->parent); if (IS_ERR(priv->regmap)) { - ret =3D PTR_ERR(priv->regmap); - dev_err(dev, "Failed to get syscon %d\n", ret); - return ret; + priv->regmap =3D device_node_to_regmap(node); + if (IS_ERR(priv->regmap)) { + ret =3D PTR_ERR(priv->regmap); + dev_err(dev, "Failed to get syscon %d\n", ret); + return ret; + } } =20 ret =3D phy_gmii_sel_init_ports(priv); --=20 2.39.2