devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: Peter Huewe <PeterHuewe-Mmb7MZpHnFY@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: I2C and devicetrees
Date: Fri, 14 Dec 2012 20:38:45 +0000	[thread overview]
Message-ID: <20121214203845.5D7ED3E0BDD@localhost> (raw)
In-Reply-To: <50C79DE8.2090201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

On Tue, 11 Dec 2012 13:56:08 -0700, Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote:
> On 12/11/2012 01:21 PM, Olof Johansson wrote:
> > [+devicetree-discuss]
> > 
> > On Wed, Dec 5, 2012 at 2:36 PM, Peter Huewe <PeterHuewe-Mmb7MZpHnFY@public.gmane.org> wrote:
> >> Hi,
> >>
> >> I have a short question about the relations between i2c and devicetrees.
> >>
> >> I was wondering
> >> is the device part of the compatible string of a (trivial) i2c device
> >> instanciated via devicetree _always_ identical to name in i2c_client.name ?
> >> Or can it be somehow different?
> > 
> > It can be different, but the driver will then need to add a OF table
> > that matches the probing. By default the i2c/dt core code will strip
> > off the vendor prefix (before ",") and try probing with the rest of
> > the device name. If that doesn't match the client name, that is when
> > you need the additional table.
> 
> While relying on the prefix stripping works, I think I recall Grant
> mentioning that people shouldn't rely on it - namely that any I2C device
> that gets instantiated from DT should contain the OF match table
> explicitly. I CC'd Grant in case I'm mis-quoting him.

I'm not quite that strict about it. The behaviour described above is
based merely on a heuristic but for a lot of drivers that don't do
anything special it works just fine. The moment you need to identify a
specific device it becomes better to use an of match table.

g.

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

  parent reply	other threads:[~2012-12-14 20:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201212052336.24233.PeterHuewe@gmx.de>
     [not found] ` <201212052336.24233.PeterHuewe-Mmb7MZpHnFY@public.gmane.org>
2012-12-11 20:21   ` I2C and devicetrees Olof Johansson
     [not found]     ` <CAOesGMhUVwB4+kuCA8hSmfhoVzkznNbjj6hjngDMaQkB83WqjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-11 20:56       ` Stephen Warren
     [not found]         ` <50C79DE8.2090201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-12-14 20:38           ` Grant Likely [this message]
2013-02-12 16:34             ` Gerlando Falauto
     [not found]               ` <511A6F26.20801-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
2013-03-01 15:33                 ` Thomas De Schampheleire
2013-03-01 19:56                 ` Thomas De Schampheleire
     [not found]                   ` <CAAXf6LXW7RXUgqOSwKKDfByK24qNdRGHgkEhN7eVN=BQKbAZmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-01 21:47                     ` Mitch Bradley
     [not found]                       ` <5131220E.70407-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2013-03-01 23:17                         ` Stephen Warren
     [not found]                           ` <51313726.6010204-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-02  0:00                             ` Mitch Bradley

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=20121214203845.5D7ED3E0BDD@localhost \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=PeterHuewe-Mmb7MZpHnFY@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@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 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).