Message ID | 1421333655-31029-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show |
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 <laurent.pinchart+renesas@ideasonboard.com> > --- > 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...
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 <laurent.pinchart+renesas@ideasonboard.com> > > --- > > 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... 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.
On Thu, Jan 15, 2015 at 6:02 PM, Wolfram Sang <wsa@the-dreams.de> 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 -- geert@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-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Jan 15, 2015 at 06:32:31PM +0100, Geert Uytterhoeven wrote: > On Thu, Jan 15, 2015 at 6:02 PM, Wolfram Sang <wsa@the-dreams.de> 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...
On Thu, Jan 15, 2015 at 3:54 PM, Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 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 <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Jan 15, 2015 at 6:43 PM, Wolfram Sang <wsa@the-dreams.de> 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 <wsa@the-dreams.de> 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 -- geert@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-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, 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 <wsa@the-dreams.de> 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...
> >> 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 :)
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 <laurent.pinchart+renesas@ideasonboard.com> On the other hand, I'll just ack this patch, so Dmitry can take both of them. D'accord? Acked-by: Wolfram Sang <wsa@the-dreams.de>
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 ?
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
(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 ?
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) at,24c08 i2c serial eeprom (24cxx) atmel,24c00 i2c serial eeprom (24cxx) atmel,24c01 i2c serial eeprom (24cxx)
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 <laurent.pinchart+renesas@ideasonboard.com> --- Documentation/devicetree/bindings/i2c/trivial-devices.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)