Thread (13 messages) 13 messages, 4 authors, 2023-11-27

Re: [PATCH v8 3/5] media: stm32-dcmipp: STM32 DCMIPP camera interface driver

From: Alain Volmat <alain.volmat@foss.st.com>
Date: 2023-11-27 13:59:02
Also in: linux-devicetree, linux-media, lkml

Hi Philipp,

On Mon, Nov 27, 2023 at 12:38:21PM +0100, Philipp Zabel wrote:
On Mi, 2023-11-22 at 08:39 +0100, Alain Volmat wrote:
quoted
From: Hugues Fruchet <hugues.fruchet@foss.st.com>

This V4L2 subdev driver enables Digital Camera Memory Interface
Pixel Processor(DCMIPP) of STMicroelectronics STM32 SoC series.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
---
[...]
quoted
diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
new file mode 100644
index 000000000000..28ddb26314c3
--- /dev/null
+++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
@@ -0,0 +1,604 @@
[...]
quoted
+struct dcmipp_device {
+	/* The platform device */
+	struct platform_device		pdev;
+	struct device			*dev;
+
+	/* Hardware resources */
+	struct reset_control		*rstc;
As long as rstc is only used in dcmipp_probe(), there is no need to
carry it around in struct dcmipp_device.
Oups, thanks.  Indeed, in first series reset was being used in another
place but this is no longer necessary now.  Thanks.

I fixed this and will push it into the v9.

Regards,
Alain
[...]
quoted
+static int dcmipp_probe(struct platform_device *pdev)
+{
+	struct dcmipp_device *dcmipp;
+	struct clk *kclk;
rstc could be a local variable here.

[...]
quoted
+	/* Get hardware resources from devicetree */
+	dcmipp->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
+	if (IS_ERR(dcmipp->rstc))
+		return dev_err_probe(&pdev->dev, PTR_ERR(dcmipp->rstc),
+				     "Could not get reset control\n");
[...]
quoted
+	/* Reset device */
+	ret = reset_control_assert(dcmipp->rstc);
+	if (ret) {
+		dev_err(&pdev->dev, "Failed to assert the reset line\n");
+		return ret;
+	}
+
+	usleep_range(3000, 5000);
+
+	ret = reset_control_deassert(dcmipp->rstc);
+	if (ret) {
+		dev_err(&pdev->dev, "Failed to deassert the reset line\n");
+		return ret;
+	}
regards
Philipp
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help