[PATCH v2] dt-bindings: iio: light: opt3001: add compatible for opt3004

Hardevsinh Palaniya posted 1 patch 1 year, 1 month ago
There is a newer version of this series
.../devicetree/bindings/iio/light/ti,opt3001.yaml      | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
[PATCH v2] dt-bindings: iio: light: opt3001: add compatible for opt3004
Posted by Hardevsinh Palaniya 1 year, 1 month ago
Add Support for OPT3004 Digital ambient light sensor (ALS) with
increased angular IR rejection.

The OPT3004 sensor shares the same functionality and scale range as
the OPT3001. the compatible string is added with fallback support to
ensure compatibility.

Datasheet: https://www.ti.com/lit/gpn/opt3004

Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
---

v1 -> v2:

- Use fallback mechanism for the OPT3004.
- Drop 2/2 patch from the patch series[1] as per feedback.

Link[1]: https://lore.kernel.org/linux-iio/20241224061321.6048-1-hardevsinh.palaniya@siliconsignals.io/T/#t

---
 .../devicetree/bindings/iio/light/ti,opt3001.yaml      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
index 67ca8d08256a..56844710e79a 100644
--- a/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
+++ b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
@@ -15,9 +15,13 @@ description: |
 
 properties:
   compatible:
-    enum:
-      - ti,opt3001
-      - ti,opt3002
+    oneOf:
+      - enum:
+          - ti,opt3001
+          - ti,opt3002
+      - items:
+          - const: ti,opt3001
+          - const: ti,opt3004
 
   reg:
     maxItems: 1
-- 
2.34.1
Re: [PATCH v2] dt-bindings: iio: light: opt3001: add compatible for opt3004
Posted by Krzysztof Kozlowski 1 year, 1 month ago
On Thu, Dec 26, 2024 at 06:47:35PM +0530, Hardevsinh Palaniya wrote:
> Add Support for OPT3004 Digital ambient light sensor (ALS) with
> increased angular IR rejection.
> 
> The OPT3004 sensor shares the same functionality and scale range as
> the OPT3001. the compatible string is added with fallback support to
> ensure compatibility.
> 
> Datasheet: https://www.ti.com/lit/gpn/opt3004
> 
> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
> ---
> 
> v1 -> v2:
> 
> - Use fallback mechanism for the OPT3004.
> - Drop 2/2 patch from the patch series[1] as per feedback.
> 
> Link[1]: https://lore.kernel.org/linux-iio/20241224061321.6048-1-hardevsinh.palaniya@siliconsignals.io/T/#t
> 
> ---
>  .../devicetree/bindings/iio/light/ti,opt3001.yaml      | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
> index 67ca8d08256a..56844710e79a 100644
> --- a/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
> @@ -15,9 +15,13 @@ description: |
>  
>  properties:
>    compatible:
> -    enum:
> -      - ti,opt3001
> -      - ti,opt3002
> +    oneOf:
> +      - enum:
> +          - ti,opt3001
> +          - ti,opt3002
> +      - items:
> +          - const: ti,opt3001
> +          - const: ti,opt3004

3004 is not the fallback.

Best regards,
Krzysztof