Re: [PATCH v11 4/7] media: qcom: camss: Add support to populate sub-devices

Loic Poulain
2026-03-27T21:22:18Z

On Thu, Mar 26, 2026 at 2:28 AM Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
>
> Use devm_of_platform_populate() to populate subs in the tree.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Other drivers typically call the populate function at the end of the
probe function. In this case, however, it is invoked before the main
resources are enabled. I assume this is because the CSIPHY device
needs to be available early. Aside from that, it looks good to me.

Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>

>
> ---
> drivers/media/platform/qcom/camss/camss.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 00b87fd9afbd8..66ea057291f6d 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -16,6 +16,7 @@
> #include <linux/of.h>
> #include <linux/of_device.h>
> #include <linux/of_graph.h>
> +#include <linux/of_platform.h>
> #include <linux/pm_runtime.h>
> #include <linux/pm_domain.h>
> #include <linux/slab.h>
> @@ -4964,6 +4965,8 @@ static int camss_probe(struct platform_device *pdev)
> if (!camss)
> return -ENOMEM;
>
> + devm_of_platform_populate(dev);
> +
> camss->res = of_device_get_match_data(dev);
>
> atomic_set(&camss->ref_count, 0);
>
> --
> 2.52.0
>
>