[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9dd39fe9-9e9d-4093-b914-13006ac99792@wanadoo.fr>
Date: Sat, 3 Feb 2024 18:12:27 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: aford173@...il.com
Cc: Laurent.pinchart@...asonboard.com, airlied@...il.com,
alexander.stein@...tq-group.com, andrzej.hajda@...el.com,
catalin.marinas@....com, conor+dt@...nel.org, daniel@...ll.ch,
devicetree@...r.kernel.org, dri-devel@...ts.freedesktop.org,
festevam@...il.com, frieder.schrempf@...tron.de, jernej.skrabec@...il.com,
jonas@...boo.se, kernel@...gutronix.de, kishon@...nel.org,
krzysztof.kozlowski+dt@...aro.org, l.stach@...gutronix.de,
linux-arm-kernel@...ts.infradead.org, linux-imx@....com,
linux-kernel@...r.kernel.org, linux-phy@...ts.infradead.org,
linux-pm@...r.kernel.org, maarten.lankhorst@...ux.intel.com, marex@...x.de,
mripard@...nel.org, neil.armstrong@...aro.org, p.zabel@...gutronix.de,
rfoss@...nel.org, robh+dt@...nel.org, s.hauer@...gutronix.de,
shawnguo@...nel.org, tzimmermann@...e.de, ulf.hansson@...aro.org,
victor.liu@....com, vkoul@...nel.org, will@...nel.org
Subject: Re: [PATCH V8 02/12] phy: freescale: add Samsung HDMI PHY
Le 03/02/2024 à 17:52, Adam Ford a écrit :
> From: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@...lic.gmane.org>
>
> This adds the driver for the Samsung HDMI PHY found on the
> i.MX8MP SoC.
>
> Signed-off-by: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@...lic.gmane.org>
> Signed-off-by: Adam Ford <aford173-Re5JQEeQqe8AvxtiuMwx3w@...lic.gmane.org>
> Tested-by: Alexander Stein <alexander.stein-W3o+9BuWjQaZox4op4iWzw@...lic.gmane.org>
> ---
..
> +static int fsl_samsung_hdmi_phy_probe(struct platform_device *pdev)
> +{
> + struct fsl_samsung_hdmi_phy *phy;
> + int ret;
> +
> + phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
> + if (!phy)
> + return -ENOMEM;
> +
> + platform_set_drvdata(pdev, phy);
> + phy->dev = &pdev->dev;
> +
> + phy->regs = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(phy->regs))
> + return PTR_ERR(phy->regs);
> +
> + phy->apbclk = devm_clk_get(phy->dev, "apb");
> + if (IS_ERR(phy->apbclk))
> + return dev_err_probe(phy->dev, PTR_ERR(phy->apbclk),
> + "failed to get apb clk\n");
> +
> + phy->refclk = devm_clk_get(phy->dev, "ref");
> + if (IS_ERR(phy->refclk))
> + return dev_err_probe(phy->dev, PTR_ERR(phy->refclk),
> + "failed to get ref clk\n");
> +
> + ret = clk_prepare_enable(phy->apbclk);
> + if (ret) {
> + dev_err(phy->dev, "failed to enable apbclk\n");
> + return ret;
> + }
> +
> + pm_runtime_get_noresume(phy->dev);
> + pm_runtime_set_active(phy->dev);
> + pm_runtime_enable(phy->dev);
> +
> + ret = phy_clk_register(phy);
> + if (ret) {
> + dev_err(&pdev->dev, "register clk failed\n");
> + goto register_clk_failed;
> + }
> +
> + pm_runtime_put(phy->dev);
> +
> + return 0;
> +
> +register_clk_failed:
> + clk_disable_unprepare(phy->apbclk);
> +
> + return ret;
> +}
> +
> +static int fsl_samsung_hdmi_phy_remove(struct platform_device *pdev)
> +{
> + of_clk_del_provider(pdev->dev.of_node);
A clk_disable_unprepare(phy->apbclk) call seems to be missing here.
Or maybe devm_clk_get_enabled() should be used for 'apbclk'?
CJ
> +
> + return 0;
> +}
..
Powered by blists - more mailing lists