From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: James Cowgill <james.cowgill@blaize.com>,
Matt Redfearn <matthew.redfearn@blaize.com>,
Neil Jones <neil.jones@blaize.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 4/7] dt-bindings: clock: Add binding constants for BLZP1600
Date: Thu, 25 Apr 2024 08:56:52 +0200 [thread overview]
Message-ID: <b9b3ccaf-7ad1-485a-9ee8-9a9922936e79@linaro.org> (raw)
In-Reply-To: <c11194fb-0449-4b36-adf1-c15d7a66344d@blaize.com>
On 24/04/2024 18:14, Nikolaos Pasaloukos wrote:
>> No, they cannot be invalid. IDs start from 0 and are incremented by one.
>> If you have holes, it is not a binding.
>>
>> Drop the header or use it properly, so as virtual IDs.
>>
>> Best regards,
>> Krzysztof
>>
> My intention was to avoid using magic numbers on the DeviceTree. That's why I added them here.
> Also, we have some custom drivers which we plan to upload and their schemas need those files.
> The alternative would be to use magic numbers for our clocks and resets.
>
> In the commit message and on the header file I have mentioned that these are numbers matching
> the hardware specification (1 to 1) of the chip not just enums.
> Some IDs are invalid because of a hardware gap, some others are invalid because the SCMI
> service will return an error that the number is invalid.
>
> Is there another way to prevent the magic numbers in the schemas and device-tree.
>
> Thank you very much for your fast and detailed review.
Bindings describe the interface between DTS and drivers (OS or some sort
of other software). The purpose of binding headers is to document the
constants which are used by both, because they are part of that
interface. Therefore constants are pure abstraction.
Let me rephrase the question: Why you do not have headers for interrupt
numbers? All addresses? GPIO pin numbers?
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-04-25 6:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 13:32 [PATCH v2 4/7] dt-bindings: clock: Add binding constants for BLZP1600 Niko Pasaloukos
2024-04-24 14:13 ` Krzysztof Kozlowski
2024-04-24 16:14 ` Nikolaos Pasaloukos
2024-04-25 6:56 ` Krzysztof Kozlowski [this message]
2024-04-25 7:18 ` Nikolaos Pasaloukos
2024-04-25 7:25 ` Krzysztof Kozlowski
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=b9b3ccaf-7ad1-485a-9ee8-9a9922936e79@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=james.cowgill@blaize.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.redfearn@blaize.com \
--cc=mturquette@baylibre.com \
--cc=neil.jones@blaize.com \
--cc=nikolaos.pasaloukos@blaize.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.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