[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqLJ9+cd9En051uRW0=r_NtXgh11KNEqys538Hsg3wcTmA@mail.gmail.com>
Date: Mon, 14 Oct 2024 09:41:38 -0500
From: Rob Herring <robh@...nel.org>
To: Richard Weinberger <richard@...ma-star.at>
Cc: Richard Weinberger <richard@....at>, devicetree@...r.kernel.org, saravanak@...gle.com,
linux-kernel@...r.kernel.org, upstream+devicetree@...ma-star.at,
Krzysztof Kozlowski <krzk@...nel.org>
Subject: Re: [PATCH] [RFC] of: Add debug aid to find unused device tree properties
On Mon, Oct 14, 2024 at 3:51 AM Richard Weinberger
<richard@...ma-star.at> wrote:
>
> Krzysztof,
>
> Am Montag, 14. Oktober 2024, 09:49:14 CEST schrieb 'Krzysztof Kozlowski' via upstream:
> > On Sun, Oct 13, 2024 at 10:07:30PM +0200, Richard Weinberger wrote:
> > > This is a proof-of-concept patch that introduces a debug feature I find
> > > particularly useful. I frequently encounter situations where I'm
> > > uncertain if my device tree configuration is correct or being utilized
> > > by the kernel. This is especially common when porting device trees
> > > from vendor kernels, as some properties may have slightly different
> > > names in the upstream kernel, or upstream drivers may not use certain
> > > properties at all.
> >
> > In general I don't mind, but I have a comment about above rationale.
> > It's just wrong. The point of DT is to describe hardware, not the one
> > given, fixed in time implementation.
>
> I agree with you, sorry for being imprecise.
>
> > What's more, writing bindings mentions this explicit: make binding
> > complete, even if it is not used.
>
> Yes, with this aid, it is IMHO easier to find bindings that need attention.
> Just as an example, lately the device tree of a vendor used the property "timers",
> but in mainline it is "ti,timers". With this debug feature, it is easy to see that
> "timers" is not being used, and somebody has to decide whether the property is
> really not used by a driver, or if the binding needs more work.
Paying attention to the schema warnings would have found this issue.
Assuming there is a schema for the node...
That's not to say this type of run-time check is not also useful.
Rob
Powered by blists - more mailing lists