Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-20 Thread Wolfram Sang

> >>@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@c042 (or
> eeprom@4042 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.



signature.asc
Description: Digital signature


Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-20 Thread Stephen Warren

On 07/20/2015 10:10 AM, Rob Herring wrote:

On Mon, Jul 20, 2015 at 3:45 AM, Wolfram Sang  wrote:



+
+   eeprom@42 {
+   compatible = "linux,slave-24c02";
+   //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42
+   reg = <0xc042>;


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@c042 (or eeprom@4042 with the correction pointed out 
earlier in the thread).

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-20 Thread Rob Herring
On Mon, Jul 20, 2015 at 3:45 AM, Wolfram Sang  wrote:
>
>> > +
>> > +   eeprom@42 {
>> > +   compatible = "linux,slave-24c02";
>> > +   //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42
>> > +   reg = <0xc042>;
>>
>> 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-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-20 Thread Wolfram Sang

> >+//FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42
> >+reg = <0xc042>;
> 
> I used it in this way:
> reg = <(I2C_OWN_SLAVE_ADDRESS | 0x42)>;

Ah, nice, it was that easy :) Thanks!



signature.asc
Description: Digital signature


Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-20 Thread Wolfram Sang

> > +
> > +   eeprom@42 {
> > +   compatible = "linux,slave-24c02";
> > +   //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42
> > +   reg = <0xc042>;
> 
> 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



signature.asc
Description: Digital signature


Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-20 Thread Laurent Pinchart
Hi Wolfram,

Thank you for the patch.

On Friday 17 July 2015 16:08:29 Wolfram Sang wrote:
> Not-Signed-off-by: Wolfram Sang 
> ---
>  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 
>  #include 
>  #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 = <0xc042>;

The node name doesn't match the reg property anymore. Isn't that considered as 
a problem ?

> + };
>   };
> 
>   /* Expansion GEN2_I2C_* */

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-20 Thread Andrey Danin

On 17.07.2015 17:08, Wolfram Sang wrote:

+
+   eeprom@42 {
+   compatible = "linux,slave-24c02";
+   //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42
+   reg = <0xc042>;


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-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 9/9] dts: tegra: WIP: hack dts to test new dt flags for i2c

2015-07-17 Thread Wolfram Sang
> + //FIXME: Should be I2C_OWN_SLAVE_ADDRESS | 0x42
> + reg = <0xc042>;

That should have been 0x4042, sorry!



signature.asc
Description: Digital signature