lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1482420549.9552.134.camel@linux.intel.com>
Date:   Thu, 22 Dec 2016 17:29:09 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Luis Oliveira <Luis.Oliveira@...opsys.com>,
        Rob Herring <robh@...nel.org>
Cc:     "wsa@...-dreams.de" <wsa@...-dreams.de>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "jarkko.nikula@...ux.intel.com" <jarkko.nikula@...ux.intel.com>,
        "mika.westerberg@...ux.intel.com" <mika.westerberg@...ux.intel.com>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Ramiro.Oliveira@...opsys.com" <Ramiro.Oliveira@...opsys.com>,
        "Joao.Pinto@...opsys.com" <Joao.Pinto@...opsys.com>,
        "CARLOS.PALMINHA@...opsys.com" <CARLOS.PALMINHA@...opsys.com>
Subject: Re: [PATCH v4 3/5] i2c: designware: Add slave definitions

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", &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@...000 {
>                         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@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ