From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Tim Bird <tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
Devicetree List
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Devicetree Spec List
<devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
Behan Webster
<behanw-k/hB3zQhLwledRVtV/plodBPR1lH4CV8@public.gmane.org>
Subject: Re: [RFC PATCH 2/5] Documentation: dt-bindings: add example DT binding document
Date: Wed, 2 Sep 2015 10:45:13 +0200 [thread overview]
Message-ID: <55E6B719.6080203@atmel.com> (raw)
In-Reply-To: <CA+bK7J4x2vY-tzUFWjM9KFMtvE+qW6jzmz=ZxWU9L8Mpe8Lduw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Le 01/09/2015 19:35, Tim Bird a écrit :
> On Fri, Aug 28, 2015 at 7:53 AM, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On Fri, Aug 28, 2015 at 12:23 AM, Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> 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.
I back Tim's advice.
Example are so important that I regularly find myself thinking "ah-ha,
okay that's supposed to work like that" after having read the binding
documentation.
Bye,
--
Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Tim Bird <tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
Devicetree List
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Devicetree Spec List
<devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
Behan Webster
<behanw-k/hB3zQhLwledRVtV/plodBPR1lH4CV8@public.gmane.org>
Subject: Re: [RFC PATCH 2/5] Documentation: dt-bindings: add example DT binding document
Date: Wed, 2 Sep 2015 10:45:13 +0200 [thread overview]
Message-ID: <55E6B719.6080203@atmel.com> (raw)
In-Reply-To: <CA+bK7J4x2vY-tzUFWjM9KFMtvE+qW6jzmz=ZxWU9L8Mpe8Lduw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Le 01/09/2015 19:35, Tim Bird a écrit :
> On Fri, Aug 28, 2015 at 7:53 AM, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On Fri, Aug 28, 2015 at 12:23 AM, Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> 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.
I back Tim's advice.
Example are so important that I regularly find myself thinking "ah-ha,
okay that's supposed to work like that" after having read the binding
documentation.
Bye,
--
Nicolas Ferre
next prev parent reply other threads:[~2015-09-02 8:45 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 5:23 [RFC PATCH 0/5] DT binding documents using text markup Matt Porter
[not found] ` <1440739433-6799-1-git-send-email-mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-08-28 5:23 ` [RFC PATCH 1/5] Documentation: dt-bindings: add documentation on new DT binding format Matt Porter
[not found] ` <1440739433-6799-2-git-send-email-mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-08-30 22:04 ` Frank Rowand
[not found] ` <55E37DF1.3080102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-08 17:38 ` Matt Porter
2015-09-01 16:59 ` Tim Bird
[not found] ` <CA+bK7J76Z6H4gh-UXxMWqUYrdRx1GYKFkAAtDUszpT_8k=RCQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08 7:55 ` David Gibson
2015-09-22 4:14 ` Matt Porter
2015-09-08 7:36 ` David Gibson
2015-08-28 5:23 ` [RFC PATCH 2/5] Documentation: dt-bindings: add example DT binding document Matt Porter
[not found] ` <1440739433-6799-3-git-send-email-mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-08-28 14:53 ` Rob Herring
[not found] ` <CAL_Jsq+FE4MCCfZC5hDhQBmM1gHibY82S9a8PC1GwsnWsPNxkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-28 14:57 ` Pantelis Antoniou
2015-08-28 14:57 ` Pantelis Antoniou
2015-08-28 17:49 ` Matt Porter
2015-08-28 18:55 ` Rob Herring
[not found] ` <CAL_JsqJy21yBGe161MrTEC1kL4UD=h+skH=mPm-vjwZ7yEHoUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-30 22:18 ` Frank Rowand
[not found] ` <55E3812B.2090105-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-08 14:56 ` Matt Porter
2015-09-01 17:30 ` Matt Porter
2015-09-01 17:35 ` Tim Bird
[not found] ` <CA+bK7J4x2vY-tzUFWjM9KFMtvE+qW6jzmz=ZxWU9L8Mpe8Lduw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-02 8:45 ` Nicolas Ferre [this message]
2015-09-02 8:45 ` Nicolas Ferre
[not found] ` <55E6B719.6080203-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-09-08 15:06 ` Matt Porter
2015-09-08 15:01 ` Matt Porter
2015-09-10 7:08 ` David Gibson
2015-09-11 4:46 ` Rob Herring
[not found] ` <55F25C95.3010104-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-09-14 8:15 ` David Gibson
2015-09-22 4:06 ` Matt Porter
2015-08-28 5:23 ` [RFC PATCH 3/5] Documentation: dt-bindings: add YAML eeprom binding Matt Porter
2015-08-28 5:23 ` [RFC PATCH 4/5] Documentation: dt-bindings: phy: add YAML generic PHY binding Matt Porter
2015-08-28 5:23 ` [RFC PATCH 5/5] Documentation: dt-bindings: phy: add YAML TI " Matt Porter
[not found] ` <1440739433-6799-6-git-send-email-mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-09-01 17:42 ` Tim Bird
[not found] ` <CA+bK7J5jz0wxgA-0jY4LFUWWoTk4YzGaGSQZsdF83BnomoBx6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08 13:47 ` Matt Porter
2015-08-28 14:26 ` [RFC PATCH 0/5] DT binding documents using text markup Rob Herring
[not found] ` <CAL_Jsq+qCJfLYxVfyQ4gAxPWLZ2=WNa0H21+cRcBi7dGVG0PMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-28 17:13 ` Matt Porter
2015-08-31 14:05 ` Rob Herring
[not found] ` <CAL_JsqJ7C4JtjGjFJjLQpLEdzbs2rw0K0TzVNB2VjOz4Sr9Nbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08 14:15 ` Matt Porter
2015-09-01 17:14 ` Tim Bird
[not found] ` <CA+bK7J4Ha55oFhCYDnUcBu8ZHCP3ReB6B=7Y9Fw7CknxPcaoWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-01 17:35 ` Frank Rowand
[not found] ` <55E5E1E2.6040607-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-01 18:03 ` Tim Bird
[not found] ` <CA+bK7J6kErnKPHs=r+X9T8KBn45HptPmtMe31CoapunKpuY34Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-01 18:24 ` Rob Herring
[not found] ` <CAL_Jsq+7NQdZivTpwRDwcGrCzpcQQoV5gvSkjz3NNOWNXdBhMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08 14:36 ` Matt Porter
2015-09-08 19:38 ` Rob Herring
2015-09-08 14:28 ` Matt Porter
2015-09-08 14:23 ` Matt Porter
2015-09-08 14:19 ` Matt Porter
2015-08-30 22:04 ` Frank Rowand
[not found] ` <55E37DE4.4090503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-01 17:34 ` Matt Porter
2015-09-01 16:14 ` Tim Bird
[not found] ` <CA+bK7J5MriF95d2OGAZRT8PyJkK_x5r1J1yPq2Ke=SZkit6xHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08 13:42 ` Matt Porter
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=55E6B719.6080203@atmel.com \
--to=nicolas.ferre-aife0yeh4naavxtiumwx3w@public.gmane.org \
--cc=behanw-k/hB3zQhLwledRVtV/plodBPR1lH4CV8@public.gmane.org \
--cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
--cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.