devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Brian Norris <computersforpeace@gmail.com>
Cc: "Stephen Warren" <swarren@wwwdotorg.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>,
	"MTD Maling List" <linux-mtd@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Marek Vasut" <marex@denx.de>, "Rafał Miłecki" <zajec5@gmail.com>
Subject: Re: [PATCH] Documentation: dt: mtd: replace "nor-jedec" binding with "jedec,spi-nor"
Date: Thu, 14 May 2015 22:26:41 +0200	[thread overview]
Message-ID: <CAMuHMdW6bDjEx+EkqLQmGCZTap-77w2wWiHpra+2pLPexwAWPw@mail.gmail.com> (raw)
In-Reply-To: <5554DF5E.4020802@wwwdotorg.org>

On Thu, May 14, 2015 at 7:46 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 05/14/2015 11:32 AM, Brian Norris wrote:
>> In commit 8ff16cf77ce3 ("Documentation: devicetree: m25p80: add
>> "nor-jedec"
>> binding"), we added a generic "nor-jedec" binding to catch all
>> mostly-compatible SPI NOR flash which can be detected via the READ ID
>> opcode (0x9F). This was discussed and reviewed at the time, however
>> objections have come up since then as part of this discussion:
>>
>>    http://lkml.kernel.org/g/20150511224646.GJ32500@ld-irv-0074
>>
>> It seems the parties involved agree that "jedec,spi-nor" does a better
>> job of capturing the fact that this is SPI-specific, not just any NOR
>> flash.
>>
>> This binding was only merged for v4.1-rc1, so it's still OK to change
>> the naming.
>>
>> At the same time, let's move the documentation to a better name.
>>
>> Next up: prune the m25p_ids[] table to the minimal necessary listing, so
>> we can stop referring to code (drivers/mtd/devices/m25p80.c) from the
>> documentation.
>
> There's no need to change the code to update the documentation. Simply paste
> the list of valid device IDs into the documentation. The binding
> documentation needs to be completely standalone anyway. Binding
> documentation should never refer to Linux driver code as part of their
> definition.
>
> You can never remove the currently-supported device-specific IDs from the
> driver, since existing DTs need to continue working forever, even with
> future drivers/kernels.
>
> The binding document should also always include a complete list of supported
> flash devices. Standard practice is that the DT compatible property contains
> a list of compatible values, starting with the device-specific value, and
> followed by any generic values. All of those values should be standardized
> and specified in the DT documentation, even if the DT binding is written in
> such a way that a compliant driver need only actively match on the generic
> value. The device-specific values may not be used today, but are present in
> case some device-specific workaround needs to be retro-actively
> implemented/enabled, since that needs to happen for existing DTs too.

Indeed, all supported flash devices should be listed in the DT binding
documentation, so checkpatch can validate dts changes:

$ scripts/checkpatch.pl -f arch/arm/boot/dts/r8a7791-koelsch.dts

[...]

WARNING: DT compatible string "spansion,s25fl512s" appears
un-documented -- check ./Documentation/devicetree/bindings/
#493: FILE: arch/arm/boot/dts/r8a7791-koelsch.dts:493:
+ compatible = "spansion,s25fl512s", "nor-jedec";

>> I'd *really* like to get an 'ack' from a DT maintainer for this, those
>> those
>> are apparently very hard to come by. And I'd really not like to have to
>> revisit
>> this again in a few weeks. We have patches getting queued up for 4.2 that
>> are
>> using the "nor-jedec" binding, and I'd like to nip those in the bud ASAP.
>
>
> I am not a DT maintainer, but the DT documentation part of this change:
> Acked-by: Stephen Warren <swarren@nvidia.com>

Likewise,
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2015-05-14 20:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 17:32 [PATCH] Documentation: dt: mtd: replace "nor-jedec" binding with "jedec,spi-nor" Brian Norris
     [not found] ` <1431624773-4165-1-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-14 17:46   ` Stephen Warren
2015-05-14 20:26     ` Geert Uytterhoeven [this message]
2015-05-15 20:02       ` Brian Norris
2015-05-15 20:52         ` Rafał Miłecki
2015-05-18 14:42         ` Stephen Warren
2015-05-15 10:17   ` Mark Rutland
2015-05-15 19:55 ` Brian Norris
2015-05-18 10:45   ` Mark Rutland
2015-05-18 18:34     ` Brian Norris
2015-05-18 18:51       ` Geert Uytterhoeven
2015-05-19  1:34         ` Brian Norris
2015-05-19  7:27           ` Rafał Miłecki
     [not found]             ` <CACna6rzpxoXEJbeRyxaR0wiPpWc_MmgvnqoW-dSw4fF-=EMM_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-20 21:35               ` Brian Norris
2015-05-21  7:12                 ` Rafał Miłecki
2015-07-21 16:57           ` Brian Norris

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=CAMuHMdW6bDjEx+EkqLQmGCZTap-77w2wWiHpra+2pLPexwAWPw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marex@denx.de \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=zajec5@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).