Re: [RFC PATCH 2/5] Documentation: dt-bindings: add example DT binding document

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

 




On Fri, Aug 28, 2015 at 7:53 AM, Rob Herring <robherring2@xxxxxxxxx> wrote:
> On Fri, Aug 28, 2015 at 12:23 AM, Matt Porter <mporter@xxxxxxxxxxxx> wrote:
...
>> +example:
>> +  - dts: |
>> +      sk11@0 {
>> +              compatible = "skel,sk11";
>> +              reg = <0>;
>> +              spi-max-frequency = <1000000>;
>> +              spi-cs-high;
>> +      };
>
> At least in this example, we could generate it. Examples are nice, but
> we have dts files full of examples already. I get a fair number of
> "fix the example" patches, so maybe we should eliminate the simple
> ones.

I would hesitate to eliminate examples.  I've been saved by them on
a few occasions, when the dts files only had one or two instances
of a type of binding, somewhat different from each other, and the example helped
break the tie.  If there's something wrong with the example, it's a sign
of an out-of-date binding doc, just as much as if the text were wrong.
It ought to be possible to validate the example versus the binding doc
(as Pantelis says), so ultimately we should be able to catch errors here
as well.
 -- Tim
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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