From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Luis Oliveira <Luis.Oliveira@synopsys.com>,
Rob Herring <robh@kernel.org>
Cc: "wsa@the-dreams.de" <wsa@the-dreams.de>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"jarkko.nikula@linux.intel.com" <jarkko.nikula@linux.intel.com>,
"mika.westerberg@linux.intel.com"
<mika.westerberg@linux.intel.com>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Ramiro.Oliveira@synopsys.com" <Ramiro.Oliveira@synopsys.com>,
"Joao.Pinto@synopsys.com" <Joao.Pinto@synopsys.com>,
"CARLOS.PALMINHA@synopsys.com" <CARLOS.PALMINHA@synopsys.com>
Subject: Re: [PATCH v4 3/5] i2c: designware: Add slave definitions
Date: Thu, 22 Dec 2016 17:29:09 +0200 [thread overview]
Message-ID: <1482420549.9552.134.camel@linux.intel.com> (raw)
In-Reply-To: <3ef11852-8dc5-dbb3-7dc3-1ec8f4fc58da@synopsys.com>
On Thu, 2016-12-22 at 14:59 +0000, Luis Oliveira wrote:
> On 13-Dec-16 14:11, Rob Herring wrote:
> > Something like this:
> >
> > of_for_each_child_node(child) {
> > of_property_read_u32(child, "reg", ®);
> > if (reg & I2C_OWN_SLAVE_ADDRESS))
> > im_a_slave = true;
> > }
> >
> > ...rather than testing "mode" is equal to "slave".
> >
> > Rob
> >
>
> Hi Rob, Andy,
>
> I'm struggling to implement your suggestion @Rob. I checked the
> tegra124-jetson-tk1.dts that uses that approach but I have some
> doubts.
>
> My DT is as follows
>
> i2c@0x2000 {
> compatible = "snps,designware-i2c";
> reg = <0x2000 0x100>;
> clock-frequency = <400000>;
> clocks = <&i2cclk>;
> interrupts = <0>;
>
> I could add something like this:
>
> eeprom@64 {
> compatible = "linux,slave-24c02";
> reg = <(I2C_OWN_SLAVE_ADDRESS | 0x64)>;
> }
>
> But I think this is different form what I was doing before. I have two
> questions:
>
> - This way the I2C controller is identified as a slave controller or
> just the
> subnode eeprom?
> - This way looks like my slave address will be fixed
>
> In the previous Patch v3 submission @Andy suggested a property that
> selects mode
> that I did and it's working. And you @Rob suggested to do it a common
> property.
> It is implemented in the DT like:
>
> mode = "slave";
>
> So before I do this changes can you please agree both if you still
> think this is
> the best approach?
I'm a bit lost in the discussion (and TBH busy by something else), so I
would agree on whatever you and Rob make an agreement on.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-12-22 15:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 17:55 [PATCH v4 0/5] i2c: designware: Add slave support Luis Oliveira
2016-12-07 17:55 ` Luis Oliveira
2016-12-07 17:55 ` [PATCH v4 1/5] i2c: designware: Refactoring of the i2c-designware Luis Oliveira
2016-12-07 18:58 ` Andy Shevchenko
2016-12-07 17:55 ` [PATCH v4 2/5] i2c: designware: Master mode as separated driver Luis Oliveira
2016-12-07 19:03 ` Andy Shevchenko
2016-12-07 17:55 ` [PATCH v4 3/5] i2c: designware: Add slave definitions Luis Oliveira
[not found] ` <5173a9456c423025d8f15baafa2499440cbe1b51.1481131072.git.lolivei-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-12-07 19:11 ` Andy Shevchenko
2016-12-07 19:11 ` Andy Shevchenko
2016-12-12 17:02 ` Rob Herring
2016-12-12 17:02 ` Rob Herring
2016-12-12 18:35 ` Luis de Oliveira
2016-12-12 23:15 ` Rob Herring
[not found] ` <CAL_JsqJwjX1Y=bDD-hKcXqa1aBKjVhXjEZm6j2tMAQszyv-QhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-13 10:50 ` Luis de Oliveira
2016-12-13 10:50 ` Luis de Oliveira
2016-12-13 14:11 ` Rob Herring
2016-12-22 14:59 ` Luis Oliveira
2016-12-22 15:29 ` Andy Shevchenko [this message]
2016-12-07 17:55 ` [PATCH v4 4/5] i2c: designware: Add slave mode as separated driver Luis Oliveira
[not found] ` <a7ca5014ad1c3f4905349a02ebe5294fe64c318e.1481131072.git.lolivei-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-12-07 19:07 ` Mark Rutland
2016-12-07 19:07 ` Mark Rutland
2016-12-08 4:38 ` kbuild test robot
2016-12-08 4:38 ` kbuild test robot
2016-12-07 19:49 ` Andy Shevchenko
2016-12-10 23:44 ` kbuild test robot
2016-12-10 23:44 ` kbuild test robot
2016-12-07 17:55 ` [PATCH v4 5/5] i2c: designware: Cleaning comments and formatation Luis Oliveira
2016-12-07 19:52 ` Andy Shevchenko
2016-12-13 15:08 ` Jarkko Nikula
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=1482420549.9552.134.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=Joao.Pinto@synopsys.com \
--cc=Luis.Oliveira@synopsys.com \
--cc=Ramiro.Oliveira@synopsys.com \
--cc=devicetree@vger.kernel.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mika.westerberg@linux.intel.com \
--cc=robh@kernel.org \
--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 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.