* [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles
@ 2023-02-07 19:29 Krzysztof Kozlowski
2023-02-07 19:29 ` [PATCH 2/2] media: dt-bindings: samsung-fimc: drop simple-bus Krzysztof Kozlowski
2023-02-07 20:15 ` [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-07 19:29 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Sylwester Nawrocki, Alim Akhtar, linux-media, devicetree,
linux-kernel, linux-arm-kernel, linux-samsung-soc
Cc: Krzysztof Kozlowski
The FIMC camera node wrapper is not a bus, so using simple-bus fallback
compatible just to instantiate its children nodes was never correct.
Driver should explicitly populate all its children devices.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/media/platform/samsung/exynos4-is/media-dev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.c b/drivers/media/platform/samsung/exynos4-is/media-dev.c
index 98a60f01129d..70c4ca7844d3 100644
--- a/drivers/media/platform/samsung/exynos4-is/media-dev.c
+++ b/drivers/media/platform/samsung/exynos4-is/media-dev.c
@@ -1440,6 +1440,10 @@ static int fimc_md_probe(struct platform_device *pdev)
if (!fmd)
return -ENOMEM;
+ ret = devm_of_platform_populate(dev);
+ if (ret < 0)
+ return -ENOMEM;
+
spin_lock_init(&fmd->slock);
INIT_LIST_HEAD(&fmd->pipelines);
fmd->pdev = pdev;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] media: dt-bindings: samsung-fimc: drop simple-bus
2023-02-07 19:29 [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles Krzysztof Kozlowski
@ 2023-02-07 19:29 ` Krzysztof Kozlowski
2023-02-07 20:15 ` [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-07 19:29 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Sylwester Nawrocki, Alim Akhtar, linux-media, devicetree,
linux-kernel, linux-arm-kernel, linux-samsung-soc
Cc: Krzysztof Kozlowski
The FIMC camera node wrapper is not a bus, so using simple-bus fallback
compatible just to instantiate its children nodes was never correct.
Drop the simple-bus compatible and expect driver to explicitly populate
children devices.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/media/samsung-fimc.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt
index 20447529c985..f90267f1180e 100644
--- a/Documentation/devicetree/bindings/media/samsung-fimc.txt
+++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt
@@ -15,7 +15,7 @@ Common 'camera' node
Required properties:
-- compatible: must be "samsung,fimc", "simple-bus"
+- compatible: must be "samsung,fimc"
- clocks: list of clock specifiers, corresponding to entries in
the clock-names property;
- clock-names : must contain "sclk_cam0", "sclk_cam1", "pxl_async0",
@@ -156,8 +156,8 @@ Example:
};
};
- camera {
- compatible = "samsung,fimc", "simple-bus";
+ camera@11800000 {
+ compatible = "samsung,fimc";
clocks = <&clock 132>, <&clock 133>, <&clock 351>,
<&clock 352>;
clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0",
@@ -166,6 +166,7 @@ Example:
clock-output-names = "cam_a_clkout", "cam_b_clkout";
pinctrl-names = "default";
pinctrl-0 = <&cam_port_a_clk_active>;
+ ranges;
#address-cells = <1>;
#size-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles
2023-02-07 19:29 [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles Krzysztof Kozlowski
2023-02-07 19:29 ` [PATCH 2/2] media: dt-bindings: samsung-fimc: drop simple-bus Krzysztof Kozlowski
@ 2023-02-07 20:15 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-07 20:15 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Sylwester Nawrocki, Alim Akhtar, linux-media, devicetree,
linux-kernel, linux-arm-kernel, linux-samsung-soc
On 07/02/2023 20:29, Krzysztof Kozlowski wrote:
> The FIMC camera node wrapper is not a bus, so using simple-bus fallback
> compatible just to instantiate its children nodes was never correct.
> Driver should explicitly populate all its children devices.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/media/platform/samsung/exynos4-is/media-dev.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.c b/drivers/media/platform/samsung/exynos4-is/media-dev.c
> index 98a60f01129d..70c4ca7844d3 100644
> --- a/drivers/media/platform/samsung/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/samsung/exynos4-is/media-dev.c
> @@ -1440,6 +1440,10 @@ static int fimc_md_probe(struct platform_device *pdev)
> if (!fmd)
> return -ENOMEM;
>
> + ret = devm_of_platform_populate(dev);
> + if (ret < 0)
> + return -ENOMEM;
> +
This cannot be devm-like, because on errors unpopulating devices breaks
links and IOMMU. I will make it of_platform_populate() instead.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-07 20:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 19:29 [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles Krzysztof Kozlowski
2023-02-07 19:29 ` [PATCH 2/2] media: dt-bindings: samsung-fimc: drop simple-bus Krzysztof Kozlowski
2023-02-07 20:15 ` [PATCH 1/2] media: samsung: exynos4-is: drop simple-bus from compatibles Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).