From: Krzysztof Kozlowski <krzk@kernel.org>
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Cc: Richard Acayan <mailingradian@gmail.com>,
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>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v6 2/5] dt-bindings: media: camss: Add qcom,sdm670-camss
Date: Wed, 30 Oct 2024 19:33:30 +0100 [thread overview]
Message-ID: <e1e92a42-eb56-46e9-b26f-eb44ec9e6692@kernel.org> (raw)
In-Reply-To: <955ea816-5394-4dbf-ba46-441634a97685@linaro.org>
On 30/10/2024 15:06, Vladimir Zapolskiy wrote:
> Hi Krzysztof,
>
> On 10/11/24 17:29, Krzysztof Kozlowski wrote:
>> On Fri, Oct 11, 2024 at 10:14:49AM +0300, Vladimir Zapolskiy wrote:
>>>> + soc {
>>>> + #address-cells = <2>;
>>>> + #size-cells = <2>;
>>>> +
>>>> + camss@ac65000 {
>>>> + compatible = "qcom,sdm670-camss";
>>>> +
>>>> + reg = <0 0x0acb3000 0 0x1000>,
>>>
>>> This is immediately wrong, unit address shall be the same as the address of the
>>> first value of reg property.
>>>
>>> I still object to the sorting order of reg values dictated by reg-names property.
>>>
>>> There are a few recently added CAMSS device tree binding descriptions, where
>>> reg values are sorted by address values without a connection to another property
>>> values, and I believe this is the correct way to go.
>>>
>>> Two most recently added CAMSS IP descriptions (qcom,sm8250-camss.yaml and
>>> qcom,sc8280xp-camss.yaml) do implement sorting by reg values, I believe from now on
>>> it should be assumed that all subsequently added CAMSS IP descriptions to follow
>>> the same established policy.
>>
>> Heh, sc8280xp introduced entirely different sorting also in interrupt-names.
>>
>> Just look at interrupts of sm8250 and sc8280xp. Luckily clocks are still
>> keeping style.
>>
>> Can you start keeping consistency? All bindings from the same family of
>> devices, especially if they share something, should have similar order
>> in lists.
>>
>> How do you imagine writing drivers and request items by order (not by
>> name) if the order is different in each flavor?
>
> I don't see a problem here, and I don't remember any reports about this
> kind of problem while adding CAMSS support in the driver to new platforms.
And I see problem, would create enormous probe code to handle different
variants for clock[0] and then clock[1], etc.
>
> While the problem of improper CAMSS unit address appears again and again,
> the focus shall be on removing a chance to make a commin mistake here.
This is not a problem. Tools already point it out. Order of reg-names
also does not affect that, you can put fake unit address regardless of
the order of reg-names items.
>
> As I've already said above, device tree bindings of CAMSS in two most
> recently added platforms sm8250 and sc8280xp follow the numerical order
> of addresses from reg value. This becomes the policy.
>
> Sorting lists of interrupts or clocks by numerical values makes no sense,
> thus the argument of *-names sorting becomes valid here. For clarity, reg
There is no such argument, no such coding style.
> property is very special, also a snippet of its value goes as a unit
> address.
And order of items does not matter for above "specialness of reg".
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-10-30 18:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 2:37 [PATCH v6 0/5] Add SDM670 camera subsystem Richard Acayan
2024-10-11 2:37 ` [PATCH v6 1/5] dt-bindings: clock: qcom,sdm845-camcc: add sdm670 compatible Richard Acayan
2024-10-11 2:37 ` [PATCH v6 2/5] dt-bindings: media: camss: Add qcom,sdm670-camss Richard Acayan
2024-10-11 7:14 ` Vladimir Zapolskiy
2024-10-11 8:31 ` Bryan O'Donoghue
2024-10-11 14:41 ` Rob Herring
2024-10-11 15:56 ` Bryan O'Donoghue
2024-10-30 14:19 ` Vladimir Zapolskiy
2024-10-30 21:06 ` Rob Herring
2024-10-30 22:13 ` Vladimir Zapolskiy
2024-11-01 9:47 ` Krzysztof Kozlowski
2024-10-11 14:29 ` Krzysztof Kozlowski
2024-10-30 14:06 ` Vladimir Zapolskiy
2024-10-30 18:33 ` Krzysztof Kozlowski [this message]
2024-10-31 15:42 ` Bryan O'Donoghue
2024-11-01 9:17 ` Krzysztof Kozlowski
2024-11-01 9:36 ` Bryan O'Donoghue
2024-11-01 9:49 ` Krzysztof Kozlowski
2024-10-11 2:37 ` [PATCH v6 3/5] media: qcom: camss: add support for SDM670 camss Richard Acayan
2024-10-11 2:37 ` [PATCH v6 4/5] arm64: dts: qcom: sdm670: add camcc Richard Acayan
2024-10-11 2:37 ` [PATCH v6 5/5] arm64: dts: qcom: sdm670: add camss and cci Richard Acayan
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=e1e92a42-eb56-46e9-b26f-eb44ec9e6692@kernel.org \
--to=krzk@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mailingradian@gmail.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;
as well as URLs for NNTP newsgroup(s).