Re: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-05-21 Thread Simon Horman
On Thu, May 21, 2015 at 01:42:25PM +0200, Geert Uytterhoeven wrote:
> From: Laurent Pinchart 
> 
> DT nodes should use the more specific adi,adxl345 and adi,adxl346
> compatible values instead. As the ADXL346 is backward-compatible with
> the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345,
> in that order.
> 
> Signed-off-by: Laurent Pinchart 
> Acked-by: Wolfram Sang 
> Signed-off-by: Geert Uytterhoeven 
> ---
> v2:
>   - Add Acked-by.

Reviewed-by: Simon Horman 

--
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


[PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-05-21 Thread Geert Uytterhoeven
From: Laurent Pinchart 

DT nodes should use the more specific adi,adxl345 and adi,adxl346
compatible values instead. As the ADXL346 is backward-compatible with
the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345,
in that order.

Signed-off-by: Laurent Pinchart 
Acked-by: Wolfram Sang 
Signed-off-by: Geert Uytterhoeven 
---
v2:
  - Add Acked-by.

 Documentation/devicetree/bindings/i2c/trivial-devices.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt 
b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index ad0c4ac916dd75ed..00f8652e193a940c 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -19,8 +19,7 @@ adi,adt7475   +/-1C TDM Extended Temp Range I.C
 adi,adt7476+/-1C TDM Extended Temp Range I.C
 adi,adt7490+/-1C TDM Extended Temp Range I.C
 adi,adxl345Three-Axis Digital Accelerometer
-adi,adxl346Three-Axis Digital Accelerometer
-adi,adxl34xThree-Axis Digital Accelerometer
+adi,adxl346Three-Axis Digital Accelerometer 
(backward-compatibility value "adi,adxl345" must be listed too)
 at,24c08   i2c serial eeprom  (24cxx)
 atmel,24c00i2c serial eeprom  (24cxx)
 atmel,24c01i2c serial eeprom  (24cxx)
-- 
1.9.1

--
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-03-02 Thread Laurent Pinchart
(CC'ing Dmitry)

On Monday 02 March 2015 07:40:49 Wolfram Sang wrote:
> On Thu, Feb 26, 2015 at 04:27:49PM +0200, Laurent Pinchart wrote:
> > On Monday 26 January 2015 13:09:47 Wolfram Sang wrote:
> > If you drop adi,adxl346, checkpatch will start complaining if it
> > encounters it in a .dts.
>  
>  Boah, this is annoying. That means we need an 346 entry even if it
>  is not different from 345 (which is fine by me).
> >>>
> >>> To be clear: you need the entry in the documentation. It can be
> >>> omitted from the driver if it's not (yet) used for matching.
> >> 
> >> Well, I don't really like that behaviour, but I don't like
> >> i2c/trivial-devices.txt as well, so I'll just apply the patch and live
> >> with it :)
> > 
> > What happened to this patch ?
> 
> My idea was that Dmitry takes them both because they are related:
> 
> http://article.gmane.org/gmane.linux.drivers.i2c/21763

I'm fine with that. Dmitry ?

-- 
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-03-01 Thread Wolfram Sang
On Thu, Feb 26, 2015 at 04:27:49PM +0200, Laurent Pinchart wrote:
> Hi Wolfram,
> 
> On Monday 26 January 2015 13:09:47 Wolfram Sang wrote:
> > > >> If you drop adi,adxl346, checkpatch will start complaining if it
> > > >> encounters
> > > >> it in a .dts.
> > > > 
> > > > Boah, this is annoying. That means we need an 346 entry even if it is
> > > > not different from 345 (which is fine by me).
> > > 
> > > To be clear: you need the entry in the documentation. It can be omitted
> > > from the driver if it's not (yet) used for matching.
> > 
> > Well, I don't really like that behaviour, but I don't like
> > i2c/trivial-devices.txt as well, so I'll just apply the patch and live
> > with it :)
> 
> What happened to this patch ?

My idea was that Dmitry takes them both because they are related:

http://article.gmane.org/gmane.linux.drivers.i2c/21763



signature.asc
Description: Digital signature


Re: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-02-26 Thread Laurent Pinchart
Hi Wolfram,

On Monday 26 January 2015 13:09:47 Wolfram Sang wrote:
> > >> If you drop adi,adxl346, checkpatch will start complaining if it
> > >> encounters
> > >> it in a .dts.
> > > 
> > > Boah, this is annoying. That means we need an 346 entry even if it is
> > > not different from 345 (which is fine by me).
> > 
> > To be clear: you need the entry in the documentation. It can be omitted
> > from the driver if it's not (yet) used for matching.
> 
> Well, I don't really like that behaviour, but I don't like
> i2c/trivial-devices.txt as well, so I'll just apply the patch and live
> with it :)

What happened to this patch ?

-- 
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-26 Thread Wolfram Sang
On Thu, Jan 15, 2015 at 04:54:14PM +0200, Laurent Pinchart wrote:
> DT nodes should use the more specific adi,adxl345 and adi,adxl346
> compatible values instead. As the ADXL346 is backward-compatible with
> the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345,
> in that order.
> 
> Signed-off-by: Laurent Pinchart 

On the other hand, I'll just ack this patch, so Dmitry can take both of
them. D'accord?

Acked-by: Wolfram Sang 



signature.asc
Description: Digital signature


Re: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-26 Thread Wolfram Sang

> >> If you drop adi,adxl346, checkpatch will start complaining if it encounters
> >> it in a .dts.
> >
> > Boah, this is annoying. That means we need an 346 entry even if it is
> > not different from 345 (which is fine by me).
> 
> To be clear: you need the entry in the documentation. It can be omitted
> from the driver if it's not (yet) used for matching.

Well, I don't really like that behaviour, but I don't like
i2c/trivial-devices.txt as well, so I'll just apply the patch and live
with it :)



signature.asc
Description: Digital signature


Re: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Laurent Pinchart
Hi Wolfram,

On Thursday 15 January 2015 18:43:33 Wolfram Sang wrote:
> On Thu, Jan 15, 2015 at 06:32:31PM +0100, Geert Uytterhoeven wrote:
> > On Thu, Jan 15, 2015 at 6:02 PM, Wolfram Sang  wrote:
> >>> --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> >>> +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> >>> @@ -18,8 +18,7 @@ adi,adt7475 +/-1C TDM Extended Temp Range I.C
> >>> 
> >>>  adi,adt7476  +/-1C TDM Extended Temp Range I.C
> >>>  adi,adt7490  +/-1C TDM Extended Temp Range I.C
> >>>  adi,adxl345  Three-Axis Digital Accelerometer
> >>> 
> >>> -adi,adxl346  Three-Axis Digital Accelerometer
> >>> -adi,adxl34x  Three-Axis Digital Accelerometer
> >>> +adi,adxl346  Three-Axis Digital Accelerometer
> >>> (backward-compatibility value "adi,adxl345" must be listed too)
> >>
> >> I'd rather drop 346 because there is no compatible for that one
> >> anywhere. No need to resend, I can fix it here...
> > 
> > If you drop adi,adxl346, checkpatch will start complaining if it
> > encounters it in a .dts.
> 
> Boah, this is annoying. That means we need an 346 entry even if it is
> not different from 345 (which is fine by me).
> 
> If checkpatch does it this way, that means the rule of thumb is to
> *always* have a dedicated compatible entry? Can someone confirm this?

I believe we should register a new compatible entry for a device when the 
device isn't identical, from a compatibility point of view, to an already 
registered device. In this specific case the adxl346 offers addition features 
compared to the adxl345. It thus qualify for its own compatible string. Its DT 
nodes should list both the adi,adxl346 and adi,adxl345 compatible strings in 
that order, as the chip is compatible with the adxl345. On the driver side, 
given that we don't need to differentiate between the devices based on the 
compatible string (as runtime model detection is possible) we don't need to 
add a match entry for adi,adxl346.

> Why did we discuss then? Now, I am confused as well...

-- 
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Geert Uytterhoeven
On Thu, Jan 15, 2015 at 6:43 PM, Wolfram Sang  wrote:
> On Thu, Jan 15, 2015 at 06:32:31PM +0100, Geert Uytterhoeven wrote:
>> On Thu, Jan 15, 2015 at 6:02 PM, Wolfram Sang  wrote:
>> >> --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
>> >> +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
>> >> @@ -18,8 +18,7 @@ adi,adt7475 +/-1C TDM Extended Temp Range I.C
>> >>  adi,adt7476  +/-1C TDM Extended Temp Range I.C
>> >>  adi,adt7490  +/-1C TDM Extended Temp Range I.C
>> >>  adi,adxl345  Three-Axis Digital Accelerometer
>> >> -adi,adxl346  Three-Axis Digital Accelerometer
>> >> -adi,adxl34x  Three-Axis Digital Accelerometer
>> >> +adi,adxl346  Three-Axis Digital Accelerometer 
>> >> (backward-compatibility value "adi,adxl345" must be listed too)
>> >
>> > I'd rather drop 346 because there is no compatible for that one anywhere.
>> > No need to resend, I can fix it here...
>>
>> If you drop adi,adxl346, checkpatch will start complaining if it encounters
>> it in a .dts.
>
> Boah, this is annoying. That means we need an 346 entry even if it is
> not different from 345 (which is fine by me).

To be clear: you need the entry in the documentation. It can be omitted
from the driver if it's not (yet) used for matching.

> If checkpatch does it this way, that means the rule of thumb is to
> *always* have a dedicated compatible entry? Can someone confirm this?

All compatible values that are in use must be documented.
Checkpatch just greps in Documentation/devicetree/bindings/.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Geert Uytterhoeven
On Thu, Jan 15, 2015 at 3:54 PM, Laurent Pinchart
 wrote:
> DT nodes should use the more specific adi,adxl345 and adi,adxl346
> compatible values instead. As the ADXL346 is backward-compatible with
> the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345,
> in that order.
>
> Signed-off-by: Laurent Pinchart 

Acked-by: Geert Uytterhoeven 

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Wolfram Sang
On Thu, Jan 15, 2015 at 06:32:31PM +0100, Geert Uytterhoeven wrote:
> On Thu, Jan 15, 2015 at 6:02 PM, Wolfram Sang  wrote:
> >> --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> >> +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> >> @@ -18,8 +18,7 @@ adi,adt7475 +/-1C TDM Extended Temp Range I.C
> >>  adi,adt7476  +/-1C TDM Extended Temp Range I.C
> >>  adi,adt7490  +/-1C TDM Extended Temp Range I.C
> >>  adi,adxl345  Three-Axis Digital Accelerometer
> >> -adi,adxl346  Three-Axis Digital Accelerometer
> >> -adi,adxl34x  Three-Axis Digital Accelerometer
> >> +adi,adxl346  Three-Axis Digital Accelerometer 
> >> (backward-compatibility value "adi,adxl345" must be listed too)
> >
> > I'd rather drop 346 because there is no compatible for that one anywhere.
> > No need to resend, I can fix it here...
> 
> If you drop adi,adxl346, checkpatch will start complaining if it encounters
> it in a .dts.

Boah, this is annoying. That means we need an 346 entry even if it is
not different from 345 (which is fine by me).

If checkpatch does it this way, that means the rule of thumb is to
*always* have a dedicated compatible entry? Can someone confirm this?

Why did we discuss then? Now, I am confused as well...



signature.asc
Description: Digital signature


Re: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Geert Uytterhoeven
On Thu, Jan 15, 2015 at 6:02 PM, Wolfram Sang  wrote:
>> --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
>> +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
>> @@ -18,8 +18,7 @@ adi,adt7475 +/-1C TDM Extended Temp Range I.C
>>  adi,adt7476  +/-1C TDM Extended Temp Range I.C
>>  adi,adt7490  +/-1C TDM Extended Temp Range I.C
>>  adi,adxl345  Three-Axis Digital Accelerometer
>> -adi,adxl346  Three-Axis Digital Accelerometer
>> -adi,adxl34x  Three-Axis Digital Accelerometer
>> +adi,adxl346  Three-Axis Digital Accelerometer 
>> (backward-compatibility value "adi,adxl345" must be listed too)
>
> I'd rather drop 346 because there is no compatible for that one anywhere.
> No need to resend, I can fix it here...

If you drop adi,adxl346, checkpatch will start complaining if it encounters
it in a .dts.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Dmitry Torokhov
On Thu, Jan 15, 2015 at 06:02:09PM +0100, Wolfram Sang wrote:
> On Thu, Jan 15, 2015 at 04:54:14PM +0200, Laurent Pinchart wrote:
> > DT nodes should use the more specific adi,adxl345 and adi,adxl346
> > compatible values instead. As the ADXL346 is backward-compatible with
> > the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345,
> > in that order.
> > 
> > Signed-off-by: Laurent Pinchart 
> > ---
> >  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt 
> > b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > index 9f41d05be3be..757e42510517 100644
> > --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > @@ -18,8 +18,7 @@ adi,adt7475   +/-1C TDM Extended Temp Range 
> > I.C
> >  adi,adt7476+/-1C TDM Extended Temp Range I.C
> >  adi,adt7490+/-1C TDM Extended Temp Range I.C
> >  adi,adxl345Three-Axis Digital Accelerometer
> > -adi,adxl346Three-Axis Digital Accelerometer
> > -adi,adxl34xThree-Axis Digital Accelerometer
> > +adi,adxl346Three-Axis Digital Accelerometer 
> > (backward-compatibility value "adi,adxl345" must be listed too)
> 
> I'd rather drop 346 because there is no compatible for that one anywhere.
> No need to resend, I can fix it here...

So color me confused now. We deprecated adi,adxl34x because it is
generic, but then we adding "specific" adi,adxl345 that covers again
both devices? Why do we do this exactly? What is broken at the moment?

Thanks.

-- 
Dmitry
--
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: [PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Wolfram Sang
On Thu, Jan 15, 2015 at 04:54:14PM +0200, Laurent Pinchart wrote:
> DT nodes should use the more specific adi,adxl345 and adi,adxl346
> compatible values instead. As the ADXL346 is backward-compatible with
> the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345,
> in that order.
> 
> Signed-off-by: Laurent Pinchart 
> ---
>  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt 
> b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> index 9f41d05be3be..757e42510517 100644
> --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> @@ -18,8 +18,7 @@ adi,adt7475 +/-1C TDM Extended Temp Range I.C
>  adi,adt7476  +/-1C TDM Extended Temp Range I.C
>  adi,adt7490  +/-1C TDM Extended Temp Range I.C
>  adi,adxl345  Three-Axis Digital Accelerometer
> -adi,adxl346  Three-Axis Digital Accelerometer
> -adi,adxl34x  Three-Axis Digital Accelerometer
> +adi,adxl346  Three-Axis Digital Accelerometer 
> (backward-compatibility value "adi,adxl345" must be listed too)

I'd rather drop 346 because there is no compatible for that one anywhere.
No need to resend, I can fix it here...



signature.asc
Description: Digital signature


[PATCH v2 1/2] DT: i2c: Deprecate adi,adxl34x compatible string

2015-01-15 Thread Laurent Pinchart
DT nodes should use the more specific adi,adxl345 and adi,adxl346
compatible values instead. As the ADXL346 is backward-compatible with
the ADXL345, ADXL346 nodes must list both adi,adxl346 and adi,adxl345,
in that order.

Signed-off-by: Laurent Pinchart 
---
 Documentation/devicetree/bindings/i2c/trivial-devices.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt 
b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index 9f41d05be3be..757e42510517 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -18,8 +18,7 @@ adi,adt7475   +/-1C TDM Extended Temp Range I.C
 adi,adt7476+/-1C TDM Extended Temp Range I.C
 adi,adt7490+/-1C TDM Extended Temp Range I.C
 adi,adxl345Three-Axis Digital Accelerometer
-adi,adxl346Three-Axis Digital Accelerometer
-adi,adxl34xThree-Axis Digital Accelerometer
+adi,adxl346Three-Axis Digital Accelerometer 
(backward-compatibility value "adi,adxl345" must be listed too)
 at,24c08   i2c serial eeprom  (24cxx)
 atmel,24c00i2c serial eeprom  (24cxx)
 atmel,24c01i2c serial eeprom  (24cxx)
-- 
2.0.5

--
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