From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0F95EB64D8 for ; Tue, 13 Jun 2023 17:36:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W4J7i2FPyKJsSnT3I/TylMDWiS97VA5gsGtcBRIpsGc=; b=KJYAG3Prankfn3 a/BEBXy4Y8qFYK9YeRubxogdIL+p59A08TABqhuiUaHHHAf4Jc90qXP4vOhkiq2BENqop3kyU5ESj WEoKDM9OfvB+LiW0NtbZ5SqaGUo044pDId9pB3HMDqwApAGOu2EJ19VCuFKsUxca8iRSKYTpneQD7 AFdCQapmwTWjpB5cR9X1jvu25NA9NaI3kjJdfuoySY0xIAp2jR2QDGxY8h+ZfJl2gpc2xlqecEZnP 3m5caHY93kj/19ioV0rFsomB1s1lSKevXstf01qqRUWTJJB5mStvFJB60QfByKfbluP3teoIqzSje cy6l3k7/5FwzikeLtYkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q97wL-008kFo-1P; Tue, 13 Jun 2023 17:36:21 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q97wH-008kEn-1X; Tue, 13 Jun 2023 17:36:19 +0000 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 45F8663406; Tue, 13 Jun 2023 17:36:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 108C9C433D9; Tue, 13 Jun 2023 17:36:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686677775; bh=yT/YcUbrOqFENj+tlyHyK738bYhHXlmlxIpioLPwxNE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rsKT4uS9AZe+fe56mjdyH4mmF18zXzKHAWTiypuw4L4FlmNcloe/tEO3mgmU8ul+Z ycS6v4BBbOoY9vJCs5Nivz20DPB0rQAxO0C4FWbZVgoOrjqpFWj1wNkFQzqVRnaZ3v 7NcAPUEpf2Vz2o0h979YmL+0fa9+vT8ay5Eym2y0R5BZage9kJJZ5TcnrE3HloHtyB oHCv8KWsPajFqsfxtjoq6REYwNFQ+HmsGVXJPcoEi5c8Jkm66SACpJjHy43B847gSB KvOU0+/V3L6G02M+zRgLeipDlnY185JSyTaLeo+a/mwBh1NI6AD8DKA8M39RJoXiKO 5gAtpZkwrATrQ== Date: Tue, 13 Jun 2023 10:39:37 -0700 From: Bjorn Andersson To: Bartosz Golaszewski Cc: Vinod Koul , Bhupesh Sharma , Andy Gross , Konrad Dybcio , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kishon Vijay Abraham I , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Bartosz Golaszewski Subject: Re: [PATCH 03/26] phy: qcom: add the SGMII SerDes PHY driver Message-ID: <20230613173937.fhk2cqcankg6oej6@ripper> References: <20230612092355.87937-1-brgl@bgdev.pl> <20230612092355.87937-4-brgl@bgdev.pl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230612092355.87937-4-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230613_103617_575244_777E254F X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Mon, Jun 12, 2023 at 11:23:32AM +0200, Bartosz Golaszewski wrote: > diff --git a/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c b/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c [..] > +static int qcom_dwmac_sgmii_phy_probe(struct platform_device *pdev) > +{ > + struct qcom_dwmac_sgmii_phy_data *data; > + struct device *dev = &pdev->dev; > + struct phy_provider *provider; > + struct clk *refclk; > + void __iomem *base; > + struct phy *phy; > + > + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); > + if (!data) > + return -ENOMEM; > + > + base = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(base)) > + return PTR_ERR(base); > + > + data->regmap = devm_regmap_init_mmio(dev, base, > + &qcom_dwmac_sgmii_phy_regmap_cfg); > + if (IS_ERR(data->regmap)) > + return PTR_ERR(data->regmap); > + > + phy = devm_phy_create(dev, NULL, &qcom_dwmac_sgmii_phy_ops); > + if (IS_ERR(phy)) > + return PTR_ERR(phy); > + > + refclk = devm_clk_get_enabled(dev, "sgmi_ref"); > + if (IS_ERR(refclk)) > + return PTR_ERR(refclk); > + > + provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); > + if (IS_ERR(provider)) > + return PTR_ERR(provider); > + > + phy_set_drvdata(phy, data); > + platform_set_drvdata(pdev, data); You don't use the pdev's dev's drvdata, so I think you can drop the platform_set_drvdata() Regards, Bjorn > + > + return 0; > +} -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy