[PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support

Svyatoslav Ryhel posted 3 patches 10 months, 1 week ago
There is a newer version of this series
[PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Svyatoslav Ryhel 10 months, 1 week ago
AL3000a is an ambient light sensor quite closely related to
exising AL3010 and can re-use exising schema for AL3010.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 .../devicetree/bindings/iio/light/dynaimage,al3010.yaml     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
index a3a979553e32..6db4dfd5aa6c 100644
--- a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
+++ b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
@@ -4,14 +4,16 @@
 $id: http://devicetree.org/schemas/iio/light/dynaimage,al3010.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Dyna-Image AL3010 sensor
+title: Dyna-Image AL3000a/AL3010 sensor
 
 maintainers:
   - David Heidelberg <david@ixit.cz>
 
 properties:
   compatible:
-    const: dynaimage,al3010
+    enum:
+      - dynaimage,al3010
+      - dynaimage,al3000a
 
   reg:
     maxItems: 1
-- 
2.43.0
Re: [PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Krzysztof Kozlowski 10 months, 1 week ago
On Wed, Feb 12, 2025 at 08:46:55AM +0200, Svyatoslav Ryhel wrote:
> AL3000a is an ambient light sensor quite closely related to
> exising AL3010 and can re-use exising schema for AL3010.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  .../devicetree/bindings/iio/light/dynaimage,al3010.yaml     | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> index a3a979553e32..6db4dfd5aa6c 100644
> --- a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> @@ -4,14 +4,16 @@
>  $id: http://devicetree.org/schemas/iio/light/dynaimage,al3010.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: Dyna-Image AL3010 sensor
> +title: Dyna-Image AL3000a/AL3010 sensor
>  
>  maintainers:
>    - David Heidelberg <david@ixit.cz>
>  
>  properties:
>    compatible:
> -    const: dynaimage,al3010
> +    enum:
> +      - dynaimage,al3010
> +      - dynaimage,al3000a

If this stays here, keep alphabetical order.

Best regards,
Krzysztof
Re: [PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Svyatoslav Ryhel 10 months, 1 week ago
чт, 13 лют. 2025 р. о 11:11 Krzysztof Kozlowski <krzk@kernel.org> пише:
>
> On Wed, Feb 12, 2025 at 08:46:55AM +0200, Svyatoslav Ryhel wrote:
> > AL3000a is an ambient light sensor quite closely related to
> > exising AL3010 and can re-use exising schema for AL3010.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> >  .../devicetree/bindings/iio/light/dynaimage,al3010.yaml     | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > index a3a979553e32..6db4dfd5aa6c 100644
> > --- a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > +++ b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > @@ -4,14 +4,16 @@
> >  $id: http://devicetree.org/schemas/iio/light/dynaimage,al3010.yaml#
> >  $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: Dyna-Image AL3010 sensor
> > +title: Dyna-Image AL3000a/AL3010 sensor
> >
> >  maintainers:
> >    - David Heidelberg <david@ixit.cz>
> >
> >  properties:
> >    compatible:
> > -    const: dynaimage,al3010
> > +    enum:
> > +      - dynaimage,al3010
> > +      - dynaimage,al3000a
>
> If this stays here, keep alphabetical order.
>

Acknowledged, thank you.

> Best regards,
> Krzysztof
>
Re: [PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Conor Dooley 10 months, 1 week ago
On Wed, Feb 12, 2025 at 08:46:55AM +0200, Svyatoslav Ryhel wrote:
> AL3000a is an ambient light sensor quite closely related to
> exising AL3010 and can re-use exising schema for AL3010.

Quite close you say, but the driver is entirely different it seems. How
closely related is the hardware itself?

> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  .../devicetree/bindings/iio/light/dynaimage,al3010.yaml     | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> index a3a979553e32..6db4dfd5aa6c 100644
> --- a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> @@ -4,14 +4,16 @@
>  $id: http://devicetree.org/schemas/iio/light/dynaimage,al3010.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: Dyna-Image AL3010 sensor
> +title: Dyna-Image AL3000a/AL3010 sensor
>  
>  maintainers:
>    - David Heidelberg <david@ixit.cz>
>  
>  properties:
>    compatible:
> -    const: dynaimage,al3010
> +    enum:
> +      - dynaimage,al3010
> +      - dynaimage,al3000a
>  
>    reg:
>      maxItems: 1
> -- 
> 2.43.0
> 
Re: [PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Svyatoslav Ryhel 10 months, 1 week ago
ср, 12 лют. 2025 р. о 21:20 Conor Dooley <conor@kernel.org> пише:
>
> On Wed, Feb 12, 2025 at 08:46:55AM +0200, Svyatoslav Ryhel wrote:
> > AL3000a is an ambient light sensor quite closely related to
> > exising AL3010 and can re-use exising schema for AL3010.
>
> Quite close you say, but the driver is entirely different it seems. How
> closely related is the hardware itself?
>

Well, I can simply duplicate al3010 or al3320a schema if re-using
schema is not allowed. AL3000a has no available datasheet online.
Downstream code for al3000a and al3010 seems to have same principles,
apart from light measurements.

> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> >  .../devicetree/bindings/iio/light/dynaimage,al3010.yaml     | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > index a3a979553e32..6db4dfd5aa6c 100644
> > --- a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > +++ b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > @@ -4,14 +4,16 @@
> >  $id: http://devicetree.org/schemas/iio/light/dynaimage,al3010.yaml#
> >  $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: Dyna-Image AL3010 sensor
> > +title: Dyna-Image AL3000a/AL3010 sensor
> >
> >  maintainers:
> >    - David Heidelberg <david@ixit.cz>
> >
> >  properties:
> >    compatible:
> > -    const: dynaimage,al3010
> > +    enum:
> > +      - dynaimage,al3010
> > +      - dynaimage,al3000a
> >
> >    reg:
> >      maxItems: 1
> > --
> > 2.43.0
> >
Re: [PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Conor Dooley 10 months, 1 week ago
On Wed, Feb 12, 2025 at 09:39:06PM +0200, Svyatoslav Ryhel wrote:
> ср, 12 лют. 2025 р. о 21:20 Conor Dooley <conor@kernel.org> пише:
> >
> > On Wed, Feb 12, 2025 at 08:46:55AM +0200, Svyatoslav Ryhel wrote:
> > > AL3000a is an ambient light sensor quite closely related to
> > > exising AL3010 and can re-use exising schema for AL3010.
> >
> > Quite close you say, but the driver is entirely different it seems. How
> > closely related is the hardware itself?
> >
> 
> Well, I can simply duplicate al3010 or al3320a schema if re-using
> schema is not allowed. AL3000a has no available datasheet online.
> Downstream code for al3000a and al3010 seems to have same principles,
> apart from light measurements.

It's probably more of a question as to why you're duplicating the driver
for them, rather than telling you not to put both bindings together.
That said, information on what's actually different is helpful in the
binding, to explain why you're not using a fallback compatible etc.

> 
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > ---
> > >  .../devicetree/bindings/iio/light/dynaimage,al3010.yaml     | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > > index a3a979553e32..6db4dfd5aa6c 100644
> > > --- a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > > +++ b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > > @@ -4,14 +4,16 @@
> > >  $id: http://devicetree.org/schemas/iio/light/dynaimage,al3010.yaml#
> > >  $schema: http://devicetree.org/meta-schemas/core.yaml#
> > >
> > > -title: Dyna-Image AL3010 sensor
> > > +title: Dyna-Image AL3000a/AL3010 sensor
> > >
> > >  maintainers:
> > >    - David Heidelberg <david@ixit.cz>
> > >
> > >  properties:
> > >    compatible:
> > > -    const: dynaimage,al3010
> > > +    enum:
> > > +      - dynaimage,al3010
> > > +      - dynaimage,al3000a
> > >
> > >    reg:
> > >      maxItems: 1
> > > --
> > > 2.43.0
> > >
Re: [PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Svyatoslav Ryhel 10 months, 1 week ago
чт, 13 лют. 2025 р. о 22:15 Conor Dooley <conor@kernel.org> пише:
>
> On Wed, Feb 12, 2025 at 09:39:06PM +0200, Svyatoslav Ryhel wrote:
> > ср, 12 лют. 2025 р. о 21:20 Conor Dooley <conor@kernel.org> пише:
> > >
> > > On Wed, Feb 12, 2025 at 08:46:55AM +0200, Svyatoslav Ryhel wrote:
> > > > AL3000a is an ambient light sensor quite closely related to
> > > > exising AL3010 and can re-use exising schema for AL3010.
> > >
> > > Quite close you say, but the driver is entirely different it seems. How
> > > closely related is the hardware itself?
> > >
> >
> > Well, I can simply duplicate al3010 or al3320a schema if re-using
> > schema is not allowed. AL3000a has no available datasheet online.
> > Downstream code for al3000a and al3010 seems to have same principles,
> > apart from light measurements.
>
> It's probably more of a question as to why you're duplicating the driver
> for them, rather than telling you not to put both bindings together.
> That said, information on what's actually different is helpful in the
> binding, to explain why you're not using a fallback compatible etc.
>

Quoting writing-bindings.rst:
DON'T refer to Linux or "device driver" in bindings. Bindings should
be based on what the hardware has, not what an OS and driver currently
support.

From all available data, hw configuration of al3000a closely matches
al3010 and seems to be part of same sensor lineup. It is not
prohibited to add new compatibles to existing schema. Schema does not
take in account way of processing data generated by sensor and this is
the main difference between al3000a and al3010

> >
> > > >
> > > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > > ---
> > > >  .../devicetree/bindings/iio/light/dynaimage,al3010.yaml     | 6 ++++--
> > > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > > > index a3a979553e32..6db4dfd5aa6c 100644
> > > > --- a/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > > > +++ b/Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml
> > > > @@ -4,14 +4,16 @@
> > > >  $id: http://devicetree.org/schemas/iio/light/dynaimage,al3010.yaml#
> > > >  $schema: http://devicetree.org/meta-schemas/core.yaml#
> > > >
> > > > -title: Dyna-Image AL3010 sensor
> > > > +title: Dyna-Image AL3000a/AL3010 sensor
> > > >
> > > >  maintainers:
> > > >    - David Heidelberg <david@ixit.cz>
> > > >
> > > >  properties:
> > > >    compatible:
> > > > -    const: dynaimage,al3010
> > > > +    enum:
> > > > +      - dynaimage,al3010
> > > > +      - dynaimage,al3000a
> > > >
> > > >    reg:
> > > >      maxItems: 1
> > > > --
> > > > 2.43.0
> > > >
Re: [PATCH v1 1/3] dt-bindings: iio: light: al3010: add al3000a support
Posted by Conor Dooley 10 months ago
On Fri, Feb 14, 2025 at 08:21:03AM +0200, Svyatoslav Ryhel wrote:
> чт, 13 лют. 2025 р. о 22:15 Conor Dooley <conor@kernel.org> пише:
> >
> > On Wed, Feb 12, 2025 at 09:39:06PM +0200, Svyatoslav Ryhel wrote:
> > > ср, 12 лют. 2025 р. о 21:20 Conor Dooley <conor@kernel.org> пише:
> > > >
> > > > On Wed, Feb 12, 2025 at 08:46:55AM +0200, Svyatoslav Ryhel wrote:
> > > > > AL3000a is an ambient light sensor quite closely related to
> > > > > exising AL3010 and can re-use exising schema for AL3010.
> > > >
> > > > Quite close you say, but the driver is entirely different it seems. How
> > > > closely related is the hardware itself?
> > > >
> > >
> > > Well, I can simply duplicate al3010 or al3320a schema if re-using
> > > schema is not allowed. AL3000a has no available datasheet online.
> > > Downstream code for al3000a and al3010 seems to have same principles,
> > > apart from light measurements.
> >
> > It's probably more of a question as to why you're duplicating the driver
> > for them, rather than telling you not to put both bindings together.
> > That said, information on what's actually different is helpful in the
> > binding, to explain why you're not using a fallback compatible etc.
> >
> 
> Quoting writing-bindings.rst:
> DON'T refer to Linux or "device driver" in bindings. Bindings should
> be based on what the hardware has, not what an OS and driver currently
> support.

No need to quite that back at me, I'm the one usually attempting to
enforce these things. I just expect more information about the
similiarties/differences when you're content splitting into two drivers
but want to reuse the same binding.

> 
> From all available data, hw configuration of al3000a closely matches
> al3010 and seems to be part of same sensor lineup. It is not
> prohibited to add new compatibles to existing schema. Schema does not
> take in account way of processing data generated by sensor and this is
> the main difference between al3000a and al3010

Please mention this in your commit message.

Cheers,
Conor.