devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Rob Herring <robh@kernel.org>
Cc: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2] checkpatch: handle PCI/USB VID,PID in DT compatible
Date: Tue, 26 Feb 2019 15:53:50 -0800	[thread overview]
Message-ID: <CA+ASDXP+fEM38ieCFdZjbjAAMqXw7F-K21rTcTLLhEAj7zNXjQ@mail.gmail.com> (raw)
In-Reply-To: <20190226223151.GA21838@bogus>

On Tue, Feb 26, 2019 at 2:31 PM Rob Herring <robh@kernel.org> wrote:
> On Fri, Feb 22, 2019 at 06:24:40PM -0800, Brian Norris wrote:
> > Documentation/devicetree/bindings/usb/usb-device.txt describes the
> > 'usbVID,...' compatible format, where VID is lower-case hexadecimal,
> > with leading zeroes suppressed. Allow it here without complaining about
> > lack of documentation (we don't need a new entry for every ID).
> >
> > PCI has a similar format
> > Documentation/devicetree/bindings/pci/pci.txt
> > http://www.devicetree.org/open-firmware/bindings/pci/pci2_1.pdf
> >
> > For both, I try to detect something that's close to a VID,PID, but I
> > intentionally don't parse beyond 4 characters of PID, since USB supports
> > extending with an interface index, and PCI supports additional subystem
> > IDs.
>
> Now that we have DT schema, that would be a better place to check the
> formatting. So I'm fine with this, but going back to the simpler version
> would be fine too.
>
> We will also be able to really check that compatibles are documented
> rather than just grepping the bindings for a compatible string.

I'm mostly interested in removing checkpatch's false warnings, however
that's best accomplished. I'll leave it up to Joe whether I should
(re)simplify the patch. I could remove the new
"WARN("UNDOCUMENTED_DT_STRING"," stuff, but once I'm doing the VID/PID
parsing, that's really trivial, so *shrug*.

Brian

      reply	other threads:[~2019-02-26 23:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23  2:24 [PATCH v2] checkpatch: handle PCI/USB VID,PID in DT compatible Brian Norris
2019-02-26 22:31 ` Rob Herring
2019-02-26 23:53   ` Brian Norris [this message]

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=CA+ASDXP+fEM38ieCFdZjbjAAMqXw7F-K21rTcTLLhEAj7zNXjQ@mail.gmail.com \
    --to=briannorris@chromium.org \
    --cc=apw@canonical.com \
    --cc=devicetree@vger.kernel.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.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 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).