public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Robert Foss <rfoss@kernel.org>, Todor Tomov <todor.too@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Bryan O'Donoghue <bod@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH v11 4/7] media: qcom: camss: Add support to populate sub-devices
Date: Fri, 27 Mar 2026 22:37:06 +0000	[thread overview]
Message-ID: <7757b121-da4f-4157-93c9-4ba162b2696f@linaro.org> (raw)
In-Reply-To: <b7hndy63j2foc5iuly4reaunaorvg5asfgeza5ptjytaghc772@6jxgnimkcvx6>

On 27/03/2026 21:33, Dmitry Baryshkov wrote:
>> 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.
> This becomes fragile. The CSI PHY might be built as a module, which
> might be loaded later.

Is it any more or less fragile than "simple-mfd" in a DT though ? 
Krzysztof isn't very much in favour of simple-mfd so this method of 
population is the alternative to hand.

The CSIPHY driver uses devm_of_phy_get which handles deferred probe. If 
the PHY module isn't loaded yet when CAMSS tries to get it, CAMSS gets 
-EPROBE_DEFER and retries.

> 
>> Reviewed-by: Loic Poulain<loic.poulain@oss.qualcomm.com>
>>
>>> @@ -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);
> And this looks suspicious. What if drivers for submodules are already
> there and start probing once populated? Do they have a chance to access
> this ref_count?

Nope, we don't share the camss pointer or any of the data-structures in 
the existing upstream driver with sub-modules.

---
bod

  reply	other threads:[~2026-03-27 22:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26  1:28 [PATCH v11 0/7] Add dt-bindings and PHY updates for CAMSS on x1e80100 silicon Bryan O'Donoghue
2026-03-26  1:28 ` [PATCH v11 1/7] dt-bindings: media: qcom,x1e80100-camss: Add optional PHY handle definitions Bryan O'Donoghue
2026-03-26  2:46   ` Rob Herring (Arm)
2026-03-26  7:33   ` Krzysztof Kozlowski
2026-03-26  7:34   ` Krzysztof Kozlowski
2026-03-26  1:28 ` [PATCH v11 2/7] dt-bindings: media: qcom,x1e80100-camss: Add support for combo-mode endpoints Bryan O'Donoghue
2026-03-26  1:51   ` Vladimir Zapolskiy
2026-03-26  2:08     ` Bryan O'Donoghue
2026-03-27 10:26       ` Konrad Dybcio
2026-03-26  1:28 ` [PATCH v11 3/7] dt-bindings: media: qcom,x1e80100-camss: Describe iommu entries Bryan O'Donoghue
2026-03-26  1:28 ` [PATCH v11 4/7] media: qcom: camss: Add support to populate sub-devices Bryan O'Donoghue
2026-03-27 21:22   ` Loic Poulain
2026-03-27 21:33     ` Dmitry Baryshkov
2026-03-27 22:37       ` Bryan O'Donoghue [this message]
2026-03-27 22:48         ` Loic Poulain
2026-03-27 22:57           ` Bryan O'Donoghue
2026-04-14 10:33   ` Konrad Dybcio
2026-03-26  1:28 ` [PATCH v11 5/7] media: qcom: camss: Add legacy_phy flag to SoC definition structures Bryan O'Donoghue
2026-03-30  8:40   ` Loic Poulain
2026-03-26  1:28 ` [PATCH v11 6/7] media: qcom: camss: Add support for PHY API devices Bryan O'Donoghue
2026-03-30  8:55   ` Loic Poulain
2026-03-26  1:28 ` [PATCH v11 7/7] media: qcom: camss: Drop legacy PHY descriptions from x1e Bryan O'Donoghue
2026-04-07 13:59   ` Loic Poulain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7757b121-da4f-4157-93c9-4ba162b2696f@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=andersson@kernel.org \
    --cc=bod@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=mchehab@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=todor.too@gmail.com \
    --cc=vladimir.zapolskiy@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox