Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1094263rwd; Tue, 16 May 2023 11:42:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YcQfO/H6Rx3zjksMX476RN0tqWnJ5ln0wpy97H0jED/tscsfEqxsn4R8l6eXt76cycio/ X-Received: by 2002:a05:6a20:4658:b0:f2:13cc:2914 with SMTP id eb24-20020a056a20465800b000f213cc2914mr40103788pzb.16.1684262532973; Tue, 16 May 2023 11:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684262532; cv=none; d=google.com; s=arc-20160816; b=W0Her2kuqnwtP/AITxan+bz5Y8CzOvGovWJewPiQhb8EHyuPXSVLDd2QxjmyarpV4o xLOHtekAktLsxD9OtF6oTDw/2bxbmK6gjmYzuWCroIAweTr8sK7jvvnaIyUAILhEsTb8 SewQRcnz4BlGs7avzmIqIMFkQHFTOM0xX49HT4OZ8lVbX2qZdtPFxxFdNm4Pqxdc8AYj TEqCe4UZMuFhfXPHOtjNT+3flZoIUDm3IicHugB5f25JPwylZWvhjHoCOFBOsTxdUKbw ZEvfj1ez2zozvIINsldskCbpNsNfum/1NUVqMeDqlCghnuOTzTqUYb6MNxjOicFtP4bA 3m6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tJJ781jtqsmllgnBvQ/Z0QxIwk7LdL+DEHu1jh5k0m4=; b=j+QbK5KPBcZCvlvUu7eU9b0xTsVxOs5Fgk3DbevWeSxVWNO/T1POSnLDEYJhuSEyHq v+5PE3DUdPR+wDuLz53TrH+C1QMv42MttymPUH2vMhfc223roseMxRT2jf2g1K32Qjdg KxvBDO1JQolryCdtkLiSiQAu+hyKEa6RgbCp0MEYSY+BmZO/GbJ8jmKGJ0Bvx1AhLeJq ztW90T3q/WlirMEPwzj5OhxcXr5Uli8DxMc6xe9fxh47SD9BJOx+kMwnYf/TPLWlIYNA jQJTOfUBznrxzBfZoVi8XhZ2fg+wkPOzyHGfytckptbN+gZAhnob14SoLHW7+MhE4T2p 4qRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rEa9im+R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020a63b517000000b0051b90567f99si19517711pge.690.2023.05.16.11.42.00; Tue, 16 May 2023 11:42:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rEa9im+R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbjEPSdb (ORCPT + 99 others); Tue, 16 May 2023 14:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjEPSda (ORCPT ); Tue, 16 May 2023 14:33:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37AA476BA for ; Tue, 16 May 2023 11:33:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BEE13632ED for ; Tue, 16 May 2023 18:33:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE016C433D2; Tue, 16 May 2023 18:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684262005; bh=a7PTnqs0YEm7IsOGAlvOif0wre27TfjbZbHFQy0cnwU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=rEa9im+Rl2Y/r0Y6FeNozIBqp5Zuk3+/eyERtBc0g5sI+ih30RXMoSsu+sN+tFfxj 9HYfjcxHwxe4tLNtYzuGQQKP7uJISNhwhIR5r940lyJs0DQ770/NPseu81MkSQ8tUS AWipO7RjPqGElhY9WCcGeXysVrsGE74TCy7htWmf9XGXYaN7EDigzEZhkU0M+caz7S xPDu42RfMh0+W81Ae7ymp1R40QOC7UBEcqeKuobuDrxg1sUwHIJIPoFumo6HONtOnc KgFpGqblHmIDsVHvHFTry7WJwknjXOjeyjjgYlGV0LRUtIfMXxQ5EmPMyzTizphM3S ECk+e3H1+1ENA== Message-ID: <3c7d7d0b-b859-8921-952c-870c9474969c@kernel.org> Date: Tue, 16 May 2023 21:33:21 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] phy: ti: gmii-sel: Allow parent to not be syscon node Content-Language: en-US To: Andrew Davis , Vinod Koul , Kishon Vijay Abraham I , Siddharth Vadapalli Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230515195922.617243-1-afd@ti.com> From: Roger Quadros In-Reply-To: <20230515195922.617243-1-afd@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On 15/05/2023 22:59, Andrew Davis wrote: > 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. Trying to understand the motive for this and if it is better to introduce a "syscon = <&syscon_node>" property instead which makes it fool proof for all cases. > > 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) > > priv->regmap = syscon_node_to_regmap(node->parent); > if (IS_ERR(priv->regmap)) { > - ret = PTR_ERR(priv->regmap); > - dev_err(dev, "Failed to get syscon %d\n", ret); > - return ret; > + priv->regmap = device_node_to_regmap(node); > + if (IS_ERR(priv->regmap)) { > + ret = PTR_ERR(priv->regmap); > + dev_err(dev, "Failed to get syscon %d\n", ret); > + return ret; > + } > } > > ret = phy_gmii_sel_init_ports(priv); -- cheers, -roger