From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Neelesh Gupta <neelegup@linux.vnet.ibm.com>,
linuxppc-dev@ozlabs.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses
Date: Fri, 14 Nov 2014 16:17:19 +1100 [thread overview]
Message-ID: <1415942239.666.37.camel@kernel.crashing.org> (raw)
In-Reply-To: <1415912020.666.17.camel@kernel.crashing.org>
On Fri, 2014-11-14 at 07:53 +1100, Benjamin Herrenschmidt wrote:
> > > > > + adapter->dev.parent = &pdev->dev;
> > > > > + adapter->dev.of_node = of_node_get(pdev->dev.of_node);
> > > > > + pname = of_get_property(pdev->dev.of_node, "port-name", NULL);
> > > >
> > > > I have never seen this binding before, it looks fishy. Where is it documented?
> > >
> > > We made it up, like pretty every SoC vendor out there. What's fishy
> > > about it ? It's a very good way to get fixed i2c port names on the
> > > system, the firmware defines them.
> >
> > But the SoC vendors prefix it with their company name and add
> > documentation for the binding.
>
> Why do we need to prefix arbitrary props for a very specific device ?
> When adding things to an existing more/less generic device it makes some
> sense but here I don't see much point. I can whip up a "binding"
> document for this adapter and make "port-name" be part of it if you
> want :) In fact a better name for the property might be "bus-id"...
Note: We've slipped in a last minute update to the FW which isn't
deployed yet to turn that into ibm,port-name and change the compatible
match to the more generic "ibm,opal-i2c" since the underlying HW
implementation doesn't have to be P8 (and in fact we'll soon also expose
the i2c bus off the Centaur memory buffer chips that goes to the DIMMs).
This is the only parts of the "binding" linux cares about. The actual
DT representation for that device is a bit more complete, there's a
parent node for the i2c master engine and a node per port, but clients
like Linux only care about the ports. The clock frequencies are in
standard properties but here too, only the FW use them for its own
internal use, this is an abstract FW API (server world ....)
Cheers,
Ben.
next prev parent reply other threads:[~2014-11-14 5:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 6:05 [PATCH] i2c: Driver to expose PowerNV platform i2c busses Neelesh Gupta
2014-11-12 6:07 ` Benjamin Herrenschmidt
2014-11-13 5:36 ` Michael Ellerman
2014-11-13 7:58 ` Wolfram Sang
2014-11-13 10:56 ` Benjamin Herrenschmidt
2014-11-13 12:40 ` Benjamin Herrenschmidt
2014-11-13 18:08 ` Neelesh Gupta
2014-11-13 13:10 ` Wolfram Sang
2014-11-13 20:53 ` Benjamin Herrenschmidt
2014-11-14 5:17 ` Benjamin Herrenschmidt [this message]
2014-11-14 16:10 ` Neelesh Gupta
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=1415942239.666.37.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=neelegup@linux.vnet.ibm.com \
--cc=wsa@the-dreams.de \
/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).