diff mbox series

[v4,7/8] dt-bindings: iio: sx9360: Add precharge resistor setting

Message ID 20220406165011.10202-8-gwendal@chromium.org (mailing list archive)
State Superseded
Headers show
Series Add settings for precharge and internal resistor | expand

Commit Message

Gwendal Grignou April 6, 2022, 4:50 p.m. UTC
Allow configure the resistance used during precharge.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
Changes since v3:
- Fix maximum field. Check make dt_binding_check passes.

Changes since v2:
- Change kOhms into ohms.

Changes since v1:
- Suffix property with kOhms.

 .../bindings/iio/proximity/semtech,sx9360.yaml           | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Stephen Boyd April 6, 2022, 5:15 p.m. UTC | #1
Quoting Gwendal Grignou (2022-04-06 09:50:10)
> Allow configure the resistance used during precharge.
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Rob Herring April 13, 2022, 6:38 p.m. UTC | #2
On Wed, Apr 06, 2022 at 09:50:10AM -0700, Gwendal Grignou wrote:
> Allow configure the resistance used during precharge.
> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
> Changes since v3:
> - Fix maximum field. Check make dt_binding_check passes.
> 
> Changes since v2:
> - Change kOhms into ohms.
> 
> Changes since v1:
> - Suffix property with kOhms.
> 
>  .../bindings/iio/proximity/semtech,sx9360.yaml           | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml
> index 63e1a1fd00d4c..20c2759ced436 100644
> --- a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml
> +++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml
> @@ -61,6 +61,14 @@ properties:
>        UINT_MAX (4294967295) represents infinite. Other values
>        represent 1-1/N.
>  
> +  semtech,input-precharge-resistor-ohms:
> +    default: 0
> +    description:
> +      Pre-charge input resistance in Ohm.
> +      Rounded down to a 2000 Ohm multiple.

You can have 'multipleOf: 2000' as a constraint.

> +    minimum: 0
> +    maximum: 30000
> +
>  required:
>    - compatible
>    - reg
> @@ -85,5 +93,6 @@ examples:
>          semtech,resolution = <256>;
>          semtech,proxraw-strength = <2>;
>          semtech,avg-pos-strength = <64>;
> +        semtech,input-precharge-resistor-ohms = <4000>;
>        };
>      };
> -- 
> 2.35.1.1094.g7c7d902a7c-goog
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml
index 63e1a1fd00d4c..20c2759ced436 100644
--- a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml
+++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml
@@ -61,6 +61,14 @@  properties:
       UINT_MAX (4294967295) represents infinite. Other values
       represent 1-1/N.
 
+  semtech,input-precharge-resistor-ohms:
+    default: 0
+    description:
+      Pre-charge input resistance in Ohm.
+      Rounded down to a 2000 Ohm multiple.
+    minimum: 0
+    maximum: 30000
+
 required:
   - compatible
   - reg
@@ -85,5 +93,6 @@  examples:
         semtech,resolution = <256>;
         semtech,proxraw-strength = <2>;
         semtech,avg-pos-strength = <64>;
+        semtech,input-precharge-resistor-ohms = <4000>;
       };
     };