[PATCH 1/2] dt-bindings: iio: tyhx,hx9023s: Add performance tuning configuration

Yasin Lee posted 2 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH 1/2] dt-bindings: iio: tyhx,hx9023s: Add performance tuning configuration
Posted by Yasin Lee 2 months, 1 week ago
When hardware design introduces significant sensor data noise,
performance can be improved by adjusting register settings.

Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
---
 .../devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
index 64ce8bc8bd36..417fbc0bb205 100644
--- a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
+++ b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
@@ -28,6 +28,13 @@ properties:
 
   vdd-supply: true
 
+  tyhx,performance-tuning:
+    description:
+      Optional, When hardware design introduces significant sensor data noise,
+      performance can be improved by adjusting register settings, including
+      but not limited to sample integration time and average sample count.
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+
   "#address-cells":
     const: 1
 
@@ -65,6 +72,13 @@ examples:
         interrupt-parent = <&pio>;
         interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
         vdd-supply = <&pp1800_prox>;
+        tyhx,performance-tuning = [00 00
+        02 17
+        0D 44
+        0E 44
+        0F 04
+        1F 65
+        21 65];
 
         #address-cells = <1>;
         #size-cells = <0>;

-- 
2.43.0
Re: [PATCH 1/2] dt-bindings: iio: tyhx,hx9023s: Add performance tuning configuration
Posted by Rob Herring 2 months ago
On Mon, Sep 23, 2024 at 09:16:10AM +0800, Yasin Lee wrote:
> When hardware design introduces significant sensor data noise,
> performance can be improved by adjusting register settings.
> 
> Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
> ---
>  .../devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml    | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
> index 64ce8bc8bd36..417fbc0bb205 100644
> --- a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
> +++ b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
> @@ -28,6 +28,13 @@ properties:
>  
>    vdd-supply: true
>  
> +  tyhx,performance-tuning:
> +    description:
> +      Optional, When hardware design introduces significant sensor data noise,
> +      performance can be improved by adjusting register settings, including
> +      but not limited to sample integration time and average sample count.
> +    $ref: /schemas/types.yaml#/definitions/uint8-array

1 byte is valid? What about 10000? Add some constraints on the array 
size and the values if possible 

> +
>    "#address-cells":
>      const: 1
>  
> @@ -65,6 +72,13 @@ examples:
>          interrupt-parent = <&pio>;
>          interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
>          vdd-supply = <&pp1800_prox>;
> +        tyhx,performance-tuning = [00 00
> +        02 17
> +        0D 44
> +        0E 44
> +        0F 04
> +        1F 65
> +        21 65];
>  
>          #address-cells = <1>;
>          #size-cells = <0>;
> 
> -- 
> 2.43.0
>
Re: [PATCH 1/2] dt-bindings: iio: tyhx,hx9023s: Add performance tuning configuration
Posted by Yasin Lee 2 months ago
On 9/25/24 05:59, Rob Herring wrote:
> On Mon, Sep 23, 2024 at 09:16:10AM +0800, Yasin Lee wrote:
>> When hardware design introduces significant sensor data noise,
>> performance can be improved by adjusting register settings.
>>
>> Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
>> ---
>>   .../devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml    | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
>> index 64ce8bc8bd36..417fbc0bb205 100644
>> --- a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
>> +++ b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
>> @@ -28,6 +28,13 @@ properties:
>>   
>>     vdd-supply: true
>>   
>> +  tyhx,performance-tuning:
>> +    description:
>> +      Optional, When hardware design introduces significant sensor data noise,
>> +      performance can be improved by adjusting register settings, including
>> +      but not limited to sample integration time and average sample count.
>> +    $ref: /schemas/types.yaml#/definitions/uint8-array
> 1 byte is valid? What about 10000? Add some constraints on the array
> size and the values if possible
>
Hi Rob,

Thank you for your feedback.

In the next version, I've added constraints on the number of elements in 
the tyhx,performance-tuning array, limiting it to between 2 and 512 
elements. Additionally, I updated the description to clarify that the 
number of elements must be even, as each pair represents a register 
address followed by a value.

Best regards,
Yasin Lee
>> +
>>     "#address-cells":
>>       const: 1
>>   
>> @@ -65,6 +72,13 @@ examples:
>>           interrupt-parent = <&pio>;
>>           interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
>>           vdd-supply = <&pp1800_prox>;
>> +        tyhx,performance-tuning = [00 00
>> +        02 17
>> +        0D 44
>> +        0E 44
>> +        0F 04
>> +        1F 65
>> +        21 65];
>>   
>>           #address-cells = <1>;
>>           #size-cells = <0>;
>>
>> -- 
>> 2.43.0
>>