diff mbox series

[v3,3/3] dt-bindings: iio: light: stk33xx: add compatible for stk3013

Message ID 20240721-stk3310-v3-3-98fcb6f551a1@disroot.org (mailing list archive)
State Changes Requested
Headers show
Series iio: light: stk3310: stk3013 support | expand

Commit Message

Kaustabh Chakraborty July 21, 2024, 10:14 a.m. UTC
STK3013 is a proximity sensor by Sensortek, bearing chipid of 0x31. Despite
being marketed as a proximity sensor, it also appears to have ambient
light sensing capabilities.

The part is fully compatible with the existing implementation of the
device driver. Add the compatible string of stk3013 to the existing
list, with a fallback of stk3310.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 Documentation/devicetree/bindings/iio/light/stk33xx.yaml | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Conor Dooley July 22, 2024, 5:05 p.m. UTC | #1
On Sun, Jul 21, 2024 at 03:44:31PM +0530, Kaustabh Chakraborty wrote:
> STK3013 is a proximity sensor by Sensortek, bearing chipid of 0x31. Despite
> being marketed as a proximity sensor, it also appears to have ambient
> light sensing capabilities.
> 
> The part is fully compatible with the existing implementation of the
> device driver. Add the compatible string of stk3013 to the existing
> list, with a fallback of stk3310.
> 
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
>  Documentation/devicetree/bindings/iio/light/stk33xx.yaml | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
> index f6e22dc9814a..d5f6b622c8da 100644
> --- a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
> @@ -18,10 +18,15 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - sensortek,stk3310
> -      - sensortek,stk3311
> -      - sensortek,stk3335
> +    oneOf:
> +      - enum:
> +        - sensortek,stk3310
> +        - sensortek,stk3311
> +        - sensortek,stk3335
> +      - items:
> +        - enum:
> +          - sensortek,stk3013
> +        - const: sensortek,stk3310
>  

./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:23:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:27:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:28:11: [warning] wrong indentation: expected 12 but found 10 (indentation)

From dt_binding_check, please fix.

>    reg:
>      maxItems: 1
> 
> -- 
> 2.45.2
>
Rob Herring (Arm) July 22, 2024, 6:41 p.m. UTC | #2
On Sun, 21 Jul 2024 15:44:31 +0530, Kaustabh Chakraborty wrote:
> STK3013 is a proximity sensor by Sensortek, bearing chipid of 0x31. Despite
> being marketed as a proximity sensor, it also appears to have ambient
> light sensing capabilities.
> 
> The part is fully compatible with the existing implementation of the
> device driver. Add the compatible string of stk3013 to the existing
> list, with a fallback of stk3310.
> 
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
>  Documentation/devicetree/bindings/iio/light/stk33xx.yaml | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:23:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:27:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:28:11: [warning] wrong indentation: expected 12 but found 10 (indentation)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240721-stk3310-v3-3-98fcb6f551a1@disroot.org

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Kaustabh Chakraborty July 26, 2024, 6:52 p.m. UTC | #3
On 2024-07-22 17:05, Conor Dooley wrote:
> On Sun, Jul 21, 2024 at 03:44:31PM +0530, Kaustabh Chakraborty wrote:
>> STK3013 is a proximity sensor by Sensortek, bearing chipid of 0x31. Despite
>> being marketed as a proximity sensor, it also appears to have ambient
>> light sensing capabilities.
>> 
>> The part is fully compatible with the existing implementation of the
>> device driver. Add the compatible string of stk3013 to the existing
>> list, with a fallback of stk3310.
>> 
>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>> ---
>>  Documentation/devicetree/bindings/iio/light/stk33xx.yaml | 13 +++++++++----
>>  1 file changed, 9 insertions(+), 4 deletions(-)
>> 
>> diff --git a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
>> index f6e22dc9814a..d5f6b622c8da 100644
>> --- a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
>> +++ b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
>> @@ -18,10 +18,15 @@ allOf:
>>  
>>  properties:
>>    compatible:
>> -    enum:
>> -      - sensortek,stk3310
>> -      - sensortek,stk3311
>> -      - sensortek,stk3335
>> +    oneOf:
>> +      - enum:
>> +        - sensortek,stk3310
>> +        - sensortek,stk3311
>> +        - sensortek,stk3335
>> +      - items:
>> +        - enum:
>> +          - sensortek,stk3013
>> +        - const: sensortek,stk3310
>>  
> 
> ./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:23:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
> ./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:27:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
> ./Documentation/devicetree/bindings/iio/light/stk33xx.yaml:28:11: [warning] wrong indentation: expected 12 but found 10 (indentation)
> 
> From dt_binding_check, please fix.

Will get fixed in v4.
Thanks.

> 
>>    reg:
>>      maxItems: 1
>> 
>> -- 
>> 2.45.2
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
index f6e22dc9814a..d5f6b622c8da 100644
--- a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
+++ b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml
@@ -18,10 +18,15 @@  allOf:
 
 properties:
   compatible:
-    enum:
-      - sensortek,stk3310
-      - sensortek,stk3311
-      - sensortek,stk3335
+    oneOf:
+      - enum:
+        - sensortek,stk3310
+        - sensortek,stk3311
+        - sensortek,stk3335
+      - items:
+        - enum:
+          - sensortek,stk3013
+        - const: sensortek,stk3310
 
   reg:
     maxItems: 1