Re: [PATCH v3 4/5] dtc: Drop dts source restriction for yaml output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Mon, Oct 11, 2021 at 2:19 AM David Gibson
<david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Jul 27, 2021 at 12:30:22PM -0600, Rob Herring wrote:
> > YAML output was restricted to dts input as there are some dependencies
> > on source annotations which get lost with other input formats. With the
> > addition of markers by the checks, YAML output from dtb format becomes
> > more useful.
> >
> > Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> Urgh.  There's not really anything wrong with this patch of itself,
> but it really underlines my feeling that the whole yaml output thing
> is a bunch of hacks in pursuit of a bogus goal.

Validating DTs is a bogus goal?

> Yaml output wants to include information that simply isn't present in
> the flattened tree format (without considering bindings), so it relies
> on formatting conventions in the dts, hence this test in the first
> place.  This alleges it removes a restriction, but it only works if a
> bunch of extra heuristics are able to guess the types correctly.

The goal here is to validate dtb files which I'd think you'd be in
favor of given your above opinions. For that to work, we have to
transform the data into the right types somewhere. We don't need any
heuristics for that. For the most part, it is done using the
definitive type information from the schemas themselves to format the
data. The exception is #*-cells patterns which need to parse the tree
to construct the type information. Given dtc already has all that
knowledge in checks, it's easier to do it there rather than
reimplement the same parsing in python.


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux