linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvmem: meson: use generic compatible
@ 2017-10-12 15:24 Jerome Brunet
  2017-10-13 19:14 ` Martin Blumenstingl
  0 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2017-10-12 15:24 UTC (permalink / raw)
  To: Srinivas Kandagatla, Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

The meson efuse driver seems to be compatible with more SoCs than
initially thought. Let's use the most generic compatible he have in
DT instead of the gxbb specific one

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 4 ++--
 drivers/nvmem/meson-efuse.c                               | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
index fafd85bd67a6..0260524292fe 100644
--- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
+++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
@@ -1,7 +1,7 @@
 = Amlogic eFuse device tree bindings =
 
 Required properties:
-- compatible: should be "amlogic,meson-gxbb-efuse"
+- compatible: should be "amlogic,meson-gx-efuse"
 
 = Data cells =
 Are child nodes of eFuse, bindings of which as described in
@@ -10,7 +10,7 @@ bindings/nvmem/nvmem.txt
 Example:
 
 	efuse: efuse {
-		compatible = "amlogic,meson-gxbb-efuse";
+		compatible = "amlogic,meson-gx-efuse";
 		#address-cells = <1>;
 		#size-cells = <1>;
 
diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
index 70bfc9839bb2..e90c6d68a263 100644
--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -44,7 +44,7 @@ static struct nvmem_config econfig = {
 };
 
 static const struct of_device_id meson_efuse_match[] = {
-	{ .compatible = "amlogic,meson-gxbb-efuse", },
+	{ .compatible = "amlogic,meson-gx-efuse", },
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_efuse_match);
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] nvmem: meson: use generic compatible
  2017-10-12 15:24 [PATCH] nvmem: meson: use generic compatible Jerome Brunet
@ 2017-10-13 19:14 ` Martin Blumenstingl
  2017-10-13 19:39   ` Jerome Brunet
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Blumenstingl @ 2017-10-13 19:14 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: Srinivas Kandagatla, Kevin Hilman, Carlo Caione, devicetree,
	linux-amlogic, linux-kernel, linux-arm-kernel

Hi Jerome,

On Thu, Oct 12, 2017 at 5:24 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> The meson efuse driver seems to be compatible with more SoCs than
> initially thought. Let's use the most generic compatible he have in
> DT instead of the gxbb specific one
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 4 ++--
>  drivers/nvmem/meson-efuse.c                               | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> index fafd85bd67a6..0260524292fe 100644
> --- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> +++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> @@ -1,7 +1,7 @@
>  = Amlogic eFuse device tree bindings =
>
>  Required properties:
> -- compatible: should be "amlogic,meson-gxbb-efuse"
> +- compatible: should be "amlogic,meson-gx-efuse"
have you checked with the devicetree maintainers how they want the
documentation to look like in this case?
(I don't know if the old one should be kept instead of removing it)

>
>  = Data cells =
>  Are child nodes of eFuse, bindings of which as described in
> @@ -10,7 +10,7 @@ bindings/nvmem/nvmem.txt
>  Example:
>
>         efuse: efuse {
> -               compatible = "amlogic,meson-gxbb-efuse";
> +               compatible = "amlogic,meson-gx-efuse";
>                 #address-cells = <1>;
>                 #size-cells = <1>;
>
> diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
> index 70bfc9839bb2..e90c6d68a263 100644
> --- a/drivers/nvmem/meson-efuse.c
> +++ b/drivers/nvmem/meson-efuse.c
> @@ -44,7 +44,7 @@ static struct nvmem_config econfig = {
>  };
>
>  static const struct of_device_id meson_efuse_match[] = {
> -       { .compatible = "amlogic,meson-gxbb-efuse", },
> +       { .compatible = "amlogic,meson-gx-efuse", },
>         { /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, meson_efuse_match);
> --
> 2.13.6
>
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] nvmem: meson: use generic compatible
  2017-10-13 19:14 ` Martin Blumenstingl
@ 2017-10-13 19:39   ` Jerome Brunet
  2017-10-17 20:52     ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2017-10-13 19:39 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Srinivas Kandagatla, Kevin Hilman, Carlo Caione, devicetree,
	linux-amlogic, linux-kernel, linux-arm-kernel

On Fri, 2017-10-13 at 21:14 +0200, Martin Blumenstingl wrote:
> Hi Jerome,
> 
> On Thu, Oct 12, 2017 at 5:24 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> > The meson efuse driver seems to be compatible with more SoCs than
> > initially thought. Let's use the most generic compatible he have in
> > DT instead of the gxbb specific one
> > 
> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > ---
> >  Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 4 ++--
> >  drivers/nvmem/meson-efuse.c                               | 2 +-
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > index fafd85bd67a6..0260524292fe 100644
> > --- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > +++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > @@ -1,7 +1,7 @@
> >  = Amlogic eFuse device tree bindings =
> > 
> >  Required properties:
> > -- compatible: should be "amlogic,meson-gxbb-efuse"
> > +- compatible: should be "amlogic,meson-gx-efuse"
> 
> have you checked with the devicetree maintainers how they want the
> documentation to look like in this case?

You mean "Should we put every compatible existing (in DT) in the documentation"
>From what I've seen, at least in meson drivers, only the matched ones are
listed.

That's a good question though.
We tend to put soc specific compatible "in case"  we need them later on. Should
we document those ?


> (I don't know if the old one should be kept instead of removing it)
> 
> > 
> >  = Data cells =
> >  Are child nodes of eFuse, bindings of which as described in
> > @@ -10,7 +10,7 @@ bindings/nvmem/nvmem.txt
> >  Example:
> > 
> >         efuse: efuse {
> > -               compatible = "amlogic,meson-gxbb-efuse";
> > +               compatible = "amlogic,meson-gx-efuse";
> >                 #address-cells = <1>;
> >                 #size-cells = <1>;
> > 
> > diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
> > index 70bfc9839bb2..e90c6d68a263 100644
> > --- a/drivers/nvmem/meson-efuse.c
> > +++ b/drivers/nvmem/meson-efuse.c
> > @@ -44,7 +44,7 @@ static struct nvmem_config econfig = {
> >  };
> > 
> >  static const struct of_device_id meson_efuse_match[] = {
> > -       { .compatible = "amlogic,meson-gxbb-efuse", },
> > +       { .compatible = "amlogic,meson-gx-efuse", },
> >         { /* sentinel */ },
> >  };
> >  MODULE_DEVICE_TABLE(of, meson_efuse_match);
> > --
> > 2.13.6
> > 
> > 
> > _______________________________________________
> > linux-amlogic mailing list
> > linux-amlogic@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] nvmem: meson: use generic compatible
  2017-10-13 19:39   ` Jerome Brunet
@ 2017-10-17 20:52     ` Rob Herring
  2017-10-18  7:31       ` Jerome Brunet
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2017-10-17 20:52 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: Martin Blumenstingl, Srinivas Kandagatla, Kevin Hilman,
	Carlo Caione, devicetree, linux-amlogic, linux-kernel,
	linux-arm-kernel

On Fri, Oct 13, 2017 at 09:39:13PM +0200, Jerome Brunet wrote:
> On Fri, 2017-10-13 at 21:14 +0200, Martin Blumenstingl wrote:
> > Hi Jerome,
> > 
> > On Thu, Oct 12, 2017 at 5:24 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> > > The meson efuse driver seems to be compatible with more SoCs than
> > > initially thought. Let's use the most generic compatible he have in
> > > DT instead of the gxbb specific one
> > > 
> > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > > ---
> > >  Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 4 ++--
> > >  drivers/nvmem/meson-efuse.c                               | 2 +-
> > >  2 files changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > index fafd85bd67a6..0260524292fe 100644
> > > --- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > +++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > @@ -1,7 +1,7 @@
> > >  = Amlogic eFuse device tree bindings =
> > > 
> > >  Required properties:
> > > -- compatible: should be "amlogic,meson-gxbb-efuse"
> > > +- compatible: should be "amlogic,meson-gx-efuse"

Same comment as for the firmware.

> > 
> > have you checked with the devicetree maintainers how they want the
> > documentation to look like in this case?
> 
> You mean "Should we put every compatible existing (in DT) in the documentation"
> From what I've seen, at least in meson drivers, only the matched ones are
> listed.
> 
> That's a good question though.
> We tend to put soc specific compatible "in case"  we need them later on. Should
> we document those ?

Absolutely.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] nvmem: meson: use generic compatible
  2017-10-17 20:52     ` Rob Herring
@ 2017-10-18  7:31       ` Jerome Brunet
  2017-10-19 21:10         ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2017-10-18  7:31 UTC (permalink / raw)
  To: Rob Herring
  Cc: Martin Blumenstingl, Srinivas Kandagatla, Kevin Hilman,
	Carlo Caione, devicetree, linux-amlogic, linux-kernel,
	linux-arm-kernel

On Tue, 2017-10-17 at 15:52 -0500, Rob Herring wrote:
> On Fri, Oct 13, 2017 at 09:39:13PM +0200, Jerome Brunet wrote:
> > On Fri, 2017-10-13 at 21:14 +0200, Martin Blumenstingl wrote:
> > > Hi Jerome,
> > > 
> > > On Thu, Oct 12, 2017 at 5:24 PM, Jerome Brunet <jbrunet@baylibre.com>
> > > wrote:
> > > > The meson efuse driver seems to be compatible with more SoCs than
> > > > initially thought. Let's use the most generic compatible he have in
> > > > DT instead of the gxbb specific one
> > > > 
> > > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 4 ++--
> > > >  drivers/nvmem/meson-efuse.c                               | 2 +-
> > > >  2 files changed, 3 insertions(+), 3 deletions(-)
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > > b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > > index fafd85bd67a6..0260524292fe 100644
> > > > --- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > > +++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > > @@ -1,7 +1,7 @@
> > > >  = Amlogic eFuse device tree bindings =
> > > > 
> > > >  Required properties:
> > > > -- compatible: should be "amlogic,meson-gxbb-efuse"
> > > > +- compatible: should be "amlogic,meson-gx-efuse"
> 
> Same comment as for the firmware.
> 
> > > 
> > > have you checked with the devicetree maintainers how they want the
> > > documentation to look like in this case?
> > 
> > You mean "Should we put every compatible existing (in DT) in the
> > documentation"
> > From what I've seen, at least in meson drivers, only the matched ones are
> > listed.
> > 
> > That's a good question though.
> > We tend to put soc specific compatible "in case"  we need them later on.
> > Should
> > we document those ?
> 
> Absolutely.

My understanding is that this documentation is the documentation of the bindings
used by the driver. 

If I understand your point, we should document bindings (compatible in that
case) that are in fact not fact by the driver. This means that if someone refer
only to the documentation, he might be surprised by the result.

> 
> Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] nvmem: meson: use generic compatible
  2017-10-18  7:31       ` Jerome Brunet
@ 2017-10-19 21:10         ` Rob Herring
  2017-10-20  8:21           ` Jerome Brunet
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2017-10-19 21:10 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: Martin Blumenstingl, Srinivas Kandagatla, Kevin Hilman,
	Carlo Caione, devicetree, linux-amlogic, linux-kernel,
	linux-arm-kernel

On Wed, Oct 18, 2017 at 2:31 AM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> On Tue, 2017-10-17 at 15:52 -0500, Rob Herring wrote:
>> On Fri, Oct 13, 2017 at 09:39:13PM +0200, Jerome Brunet wrote:
>> > On Fri, 2017-10-13 at 21:14 +0200, Martin Blumenstingl wrote:
>> > > Hi Jerome,
>> > >
>> > > On Thu, Oct 12, 2017 at 5:24 PM, Jerome Brunet <jbrunet@baylibre.com>
>> > > wrote:
>> > > > The meson efuse driver seems to be compatible with more SoCs than
>> > > > initially thought. Let's use the most generic compatible he have in
>> > > > DT instead of the gxbb specific one
>> > > >
>> > > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
>> > > > ---
>> > > >  Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 4 ++--
>> > > >  drivers/nvmem/meson-efuse.c                               | 2 +-
>> > > >  2 files changed, 3 insertions(+), 3 deletions(-)
>> > > >
>> > > > diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
>> > > > b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
>> > > > index fafd85bd67a6..0260524292fe 100644
>> > > > --- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
>> > > > +++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
>> > > > @@ -1,7 +1,7 @@
>> > > >  = Amlogic eFuse device tree bindings =
>> > > >
>> > > >  Required properties:
>> > > > -- compatible: should be "amlogic,meson-gxbb-efuse"
>> > > > +- compatible: should be "amlogic,meson-gx-efuse"
>>
>> Same comment as for the firmware.
>>
>> > >
>> > > have you checked with the devicetree maintainers how they want the
>> > > documentation to look like in this case?
>> >
>> > You mean "Should we put every compatible existing (in DT) in the
>> > documentation"
>> > From what I've seen, at least in meson drivers, only the matched ones are
>> > listed.
>> >
>> > That's a good question though.
>> > We tend to put soc specific compatible "in case"  we need them later on.
>> > Should
>> > we document those ?
>>
>> Absolutely.
>
> My understanding is that this documentation is the documentation of the bindings
> used by the driver.

No, the binding doc should be sufficient to validate the dts.

> If I understand your point, we should document bindings (compatible in that
> case) that are in fact not fact by the driver. This means that if someone refer
> only to the documentation, he might be surprised by the result.

How so?

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] nvmem: meson: use generic compatible
  2017-10-19 21:10         ` Rob Herring
@ 2017-10-20  8:21           ` Jerome Brunet
  0 siblings, 0 replies; 7+ messages in thread
From: Jerome Brunet @ 2017-10-20  8:21 UTC (permalink / raw)
  To: Rob Herring
  Cc: Martin Blumenstingl, Srinivas Kandagatla, Kevin Hilman,
	Carlo Caione, devicetree, linux-amlogic, linux-kernel,
	linux-arm-kernel

On Thu, 2017-10-19 at 16:10 -0500, Rob Herring wrote:
> On Wed, Oct 18, 2017 at 2:31 AM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> > On Tue, 2017-10-17 at 15:52 -0500, Rob Herring wrote:
> > > On Fri, Oct 13, 2017 at 09:39:13PM +0200, Jerome Brunet wrote:
> > > > On Fri, 2017-10-13 at 21:14 +0200, Martin Blumenstingl wrote:
> > > > > Hi Jerome,
> > > > > 
> > > > > On Thu, Oct 12, 2017 at 5:24 PM, Jerome Brunet <jbrunet@baylibre.com>
> > > > > wrote:
> > > > > > The meson efuse driver seems to be compatible with more SoCs than
> > > > > > initially thought. Let's use the most generic compatible he have in
> > > > > > DT instead of the gxbb specific one
> > > > > > 
> > > > > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > > > > > ---
> > > > > >  Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 4 ++--
> > > > > >  drivers/nvmem/meson-efuse.c                               | 2 +-
> > > > > >  2 files changed, 3 insertions(+), 3 deletions(-)
> > > > > > 
> > > > > > diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-
> > > > > > efuse.txt
> > > > > > b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > > > > index fafd85bd67a6..0260524292fe 100644
> > > > > > --- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > > > > +++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
> > > > > > @@ -1,7 +1,7 @@
> > > > > >  = Amlogic eFuse device tree bindings =
> > > > > > 
> > > > > >  Required properties:
> > > > > > -- compatible: should be "amlogic,meson-gxbb-efuse"
> > > > > > +- compatible: should be "amlogic,meson-gx-efuse"
> > > 
> > > Same comment as for the firmware.
> > > 
> > > > > 
> > > > > have you checked with the devicetree maintainers how they want the
> > > > > documentation to look like in this case?
> > > > 
> > > > You mean "Should we put every compatible existing (in DT) in the
> > > > documentation"
> > > > From what I've seen, at least in meson drivers, only the matched ones
> > > > are
> > > > listed.
> > > > 
> > > > That's a good question though.
> > > > We tend to put soc specific compatible "in case"  we need them later on.
> > > > Should
> > > > we document those ?
> > > 
> > > Absolutely.
> > 
> > My understanding is that this documentation is the documentation of the
> > bindings
> > used by the driver.
> 
> No, the binding doc should be sufficient to validate the dts.
> 
> > If I understand your point, we should document bindings (compatible in that
> > case) that are in fact not fact by the driver. This means that if someone
> > refer
> > only to the documentation, he might be surprised by the result.
> 
> How so?

Compatible not matched.
If the compatible is documented, I would expect "a driver" to match on it

If we document every compatible used in DTS, some won't be matched.

IMO, the current way (document the driver - the matched bindings) is easier and
more predictable.

> 
> Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-20  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-12 15:24 [PATCH] nvmem: meson: use generic compatible Jerome Brunet
2017-10-13 19:14 ` Martin Blumenstingl
2017-10-13 19:39   ` Jerome Brunet
2017-10-17 20:52     ` Rob Herring
2017-10-18  7:31       ` Jerome Brunet
2017-10-19 21:10         ` Rob Herring
2017-10-20  8:21           ` Jerome Brunet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).