[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231208165855.GA8459@kernel.org>
Date: Fri, 8 Dec 2023 16:58:55 +0000
From: Simon Horman <horms@...nel.org>
To: Raphael Gallais-Pou <raphael.gallais-pou@...s.st.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Yannick Fertre <yannick.fertre@...s.st.com>,
Philippe Cornu <philippe.cornu@...s.st.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Richard Cochran <richardcochran@...il.com>,
devicetree@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2 3/4] drm/stm: dsi: expose DSI PHY internal clock
On Mon, Dec 04, 2023 at 11:11:12AM +0100, Raphael Gallais-Pou wrote:
...
> @@ -514,18 +675,40 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev)
> dsi->lane_max_kbps *= 2;
> }
>
> - dw_mipi_dsi_stm_plat_data.base = dsi->base;
> - dw_mipi_dsi_stm_plat_data.priv_data = dsi;
> + dsi->pdata = *pdata;
> + dsi->pdata.base = dsi->base;
> + dsi->pdata.priv_data = dsi;
> +
> + dsi->pdata.max_data_lanes = 2;
> + dsi->pdata.phy_ops = &dw_mipi_dsi_stm_phy_ops;
>
> platform_set_drvdata(pdev, dsi);
>
> - dsi->dsi = dw_mipi_dsi_probe(pdev, &dw_mipi_dsi_stm_plat_data);
> + dsi->dsi = dw_mipi_dsi_probe(pdev, &dsi->pdata);
> if (IS_ERR(dsi->dsi)) {
> ret = PTR_ERR(dsi->dsi);
> dev_err_probe(dev, ret, "Failed to initialize mipi dsi host\n");
> goto err_dsi_probe;
> }
>
> + /*
> + * We need to wait for the generic bridge to probe before enabling and
> + * register the internal pixel clock.
> + */
> + ret = clk_prepare_enable(dsi->pclk);
> + if (ret) {
> + DRM_ERROR("%s: Failed to enable peripheral clk\n", __func__);
> + goto err_dsi_probe;
> + }
> +
> + ret = dw_mipi_dsi_clk_register(dsi, dev);
> + if (ret) {
> + DRM_ERROR("Failed to register DSI pixel clock: %d\n", ret);
Hi Raphael,
Does clk_disable_unprepare(dsi->pclk) need to be added to this unwind
chain?
Flagged by Smatch.
> + goto err_dsi_probe;
> + }
> +
> + clk_disable_unprepare(dsi->pclk);
> +
> return 0;
>
> err_dsi_probe:
...
Powered by blists - more mailing lists