From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH 1/2] regulator: dt-bindings: maxim, max8997: correct array of voltages
Date: Sun, 3 Apr 2022 10:11:28 -0500 [thread overview]
Message-ID: <Ykm5IG2EUUSSotUF@robh.at.kernel.org> (raw)
In-Reply-To: <20220331211653.175200-1-krzysztof.kozlowski@linaro.org>
On Thu, Mar 31, 2022 at 11:16:52PM +0200, Krzysztof Kozlowski wrote:
> uint32-array with voltages should be within one bracket pair <>, not
> each number in its own <>. Also the number of elements in the array
> should be defined within "items:".
Which encoding an array uses has been a source of pain.
>
> This fixes DT schema warnings like:
>
> maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
> [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short
These exist due to the move from validating yaml files to DTBs and I
haven't come up with how to fix the warning. The schema was correct as
it was. The change leaks the encoding (everything is a matrix) into the
schema which we don't want to do.
The issue is in the if/then schema, the tools don't know if the type is
an array or matrix. It gets it wrong (or different from the top-level)
and thus the warning. I think the fix will be using the extracted type
information to do the right transformation. The code for all this is
pretty horrible and I've lost count of how many times I've re-written
it. I think a lot of it can be removed when/if support for yaml encoded
DT is removed which I think can happen in a kernel cycle or 2.
Perhaps in the short term the example can just be removed or commented
out though that doesn't help on dts files.
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-03 15:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 21:16 [PATCH 1/2] regulator: dt-bindings: maxim, max8997: correct array of voltages Krzysztof Kozlowski
2022-03-31 21:16 ` [PATCH 2/2] ARM: dts: exynos: correct array of voltages in i9100 and Trats Krzysztof Kozlowski
2022-04-01 7:46 ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: correct array of voltages Geert Uytterhoeven
2022-04-03 15:11 ` Rob Herring [this message]
2022-04-03 15:46 ` 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=Ykm5IG2EUUSSotUF@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.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