Message ID | 1437142109-31975-10-git-send-email-wsa@the-dreams.de (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Geert Uytterhoeven |
Headers | show |
> + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 > + reg = <0xc0000042>; That should have been 0x40000042, sorry!
On 17.07.2015 17:08, Wolfram Sang wrote: > + > + eeprom@42 { > + compatible = "linux,slave-24c02"; > + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 > + reg = <0xc0000042>; I used it in this way: reg = <(I2C_OWN_SLAVE_ADDRESS | 0x42)>; > + }; > }; > > /* Expansion GEN2_I2C_* */ > -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Wolfram, Thank you for the patch. On Friday 17 July 2015 16:08:29 Wolfram Sang wrote: > Not-Signed-off-by: Wolfram Sang <wsa@the-dreams.de> > --- > arch/arm/boot/dts/tegra124-jetson-tk1.dts | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts > b/arch/arm/boot/dts/tegra124-jetson-tk1.dts index > bd43ed6d6ec7c0..4d5f2a4c4da1ce 100644 > --- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts > +++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts > @@ -1,5 +1,6 @@ > /dts-v1/; > > +#include <dt-bindings/i2c/i2c.h> > #include <dt-bindings/input/input.h> > #include "tegra124.dtsi" > > @@ -1390,6 +1391,12 @@ > reg = <0x56>; > pagesize = <8>; > }; > + > + eeprom@42 { > + compatible = "linux,slave-24c02"; > + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 > + reg = <0xc0000042>; The node name doesn't match the reg property anymore. Isn't that considered as a problem ? > + }; > }; > > /* Expansion GEN2_I2C_* */
> > + > > + eeprom@42 { > > + compatible = "linux,slave-24c02"; > > + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 > > + reg = <0xc0000042>; > > The node name doesn't match the reg property anymore. Isn't that considered as > a problem ? Hmm, true. So far, Rob (CCed) was fine with this approach: http://www.spinics.net/lists/linux-tegra/msg22760.html @Rob: If we introduce flag bits in the MSBs of an I2C address, the reg property is different from the node name. Is this a problem? Thanks, Wolfram
> >+ //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 > >+ reg = <0xc0000042>; > > I used it in this way: > reg = <(I2C_OWN_SLAVE_ADDRESS | 0x42)>; Ah, nice, it was that easy :) Thanks!
On Mon, Jul 20, 2015 at 3:45 AM, Wolfram Sang <wsa@the-dreams.de> wrote: > >> > + >> > + eeprom@42 { >> > + compatible = "linux,slave-24c02"; >> > + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 >> > + reg = <0xc0000042>; >> >> The node name doesn't match the reg property anymore. Isn't that considered as >> a problem ? > > Hmm, true. So far, Rob (CCed) was fine with this approach: > http://www.spinics.net/lists/linux-tegra/msg22760.html > > @Rob: If we introduce flag bits in the MSBs of an I2C address, the reg > property is different from the node name. Is this a problem? No, I don't it is a problem. Rob -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/20/2015 10:10 AM, Rob Herring wrote: > On Mon, Jul 20, 2015 at 3:45 AM, Wolfram Sang <wsa@the-dreams.de> wrote: >> >>>> + >>>> + eeprom@42 { >>>> + compatible = "linux,slave-24c02"; >>>> + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 >>>> + reg = <0xc0000042>; >>> >>> The node name doesn't match the reg property anymore. Isn't that considered as >>> a problem ? >> >> Hmm, true. So far, Rob (CCed) was fine with this approach: >> http://www.spinics.net/lists/linux-tegra/msg22760.html >> >> @Rob: If we introduce flag bits in the MSBs of an I2C address, the reg >> property is different from the node name. Is this a problem? > > No, I don't it is a problem. The rule so far has been that the unit address (the value in the node name) must match the first value in the reg property. I don't see why this rule should change. To solve this, just name the node eeprom@c0000042 (or eeprom@40000042 with the correction pointed out earlier in the thread). -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> >>@Rob: If we introduce flag bits in the MSBs of an I2C address, the reg > >>property is different from the node name. Is this a problem? > > > >No, I don't it is a problem. > > The rule so far has been that the unit address (the value in the node name) > must match the first value in the reg property. I don't see why this rule > should change. To solve this, just name the node eeprom@c0000042 (or > eeprom@40000042 with the correction pointed out earlier in the thread). We can do that; that would mean that people need to find out the values of the #define which will be used in the reg property. It works, but will be cumbersome IMO.
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts index bd43ed6d6ec7c0..4d5f2a4c4da1ce 100644 --- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts +++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts @@ -1,5 +1,6 @@ /dts-v1/; +#include <dt-bindings/i2c/i2c.h> #include <dt-bindings/input/input.h> #include "tegra124.dtsi" @@ -1390,6 +1391,12 @@ reg = <0x56>; pagesize = <8>; }; + + eeprom@42 { + compatible = "linux,slave-24c02"; + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42 + reg = <0xc0000042>; + }; }; /* Expansion GEN2_I2C_* */