devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] dt-bindings:iio:adc: add documentation for TI LMP92064 controller
@ 2022-10-04 13:42 Leonard Göhrs
  2022-10-04 14:56 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Leonard Göhrs @ 2022-10-04 13:42 UTC (permalink / raw)
  To: Leonard Göhrs, kernel, Jonathan Cameron, Lars-Peter Clausen
  Cc: Rob Herring, Krzysztof Kozlowski, linux-iio, devicetree,
	linux-kernel

Add binding documentation for the TI LMP92064 dual channel SPI ADC.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
---
 .../bindings/iio/adc/ti,lmp92064.yaml         | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml b/Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml
new file mode 100644
index 0000000000000..b7b5761baa108
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,lmp92064.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments LMP92064 Precision Current and Voltage Sensor.
+
+maintainers:
+  - Leonard Göhrs <l.goehrs@pengutronix.de>
+
+description: |
+  The LMP92064 is a two channel ADC intended for combined voltage and current
+  measurements.
+
+  The device contains two ADCs to allow simultaneous sampling of voltage and
+  current and thus of instantanious power consumption.
+
+properties:
+  compatible:
+    enum:
+      - ti,lmp92064
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  shunt-resistor:
+    description: |
+      Value of the shunt resistor (in µΩ) connected between INCP and INCN,
+      across which current is measured. Used to provide correct scaling of the
+      raw adc measurement.
+
+  reset-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - shunt-resistor
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,lmp92064";
+            reg = <0>;
+            spi-max-frequency = <1000000>;
+            shunt-resistor = <15000>;
+            reset-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
+        };
+    };
+...
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings:iio:adc: add documentation for TI LMP92064 controller
  2022-10-04 13:42 [PATCH v1 1/2] dt-bindings:iio:adc: add documentation for TI LMP92064 controller Leonard Göhrs
@ 2022-10-04 14:56 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-04 14:56 UTC (permalink / raw)
  To: Leonard Göhrs, kernel, Jonathan Cameron, Lars-Peter Clausen
  Cc: Rob Herring, Krzysztof Kozlowski, linux-iio, devicetree,
	linux-kernel

On 04/10/2022 15:42, Leonard Göhrs wrote:
> Add binding documentation for the TI LMP92064 dual channel SPI ADC.

Subject: missing spaces after ':'. Also drop "documentation" - kind of
redundant.


> 
> Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
> ---
>  .../bindings/iio/adc/ti,lmp92064.yaml         | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml b/Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml
> new file mode 100644
> index 0000000000000..b7b5761baa108
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,lmp92064.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/ti,lmp92064.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments LMP92064 Precision Current and Voltage Sensor.
> +
> +maintainers:
> +  - Leonard Göhrs <l.goehrs@pengutronix.de>
> +
> +description: |
> +  The LMP92064 is a two channel ADC intended for combined voltage and current
> +  measurements.
> +
> +  The device contains two ADCs to allow simultaneous sampling of voltage and
> +  current and thus of instantanious power consumption.

Not sure if my spell-check misses a word or you meant "instantaneous"?

> +

Missing allOf:$ref to spi-peripheral-props.yaml

> +properties:
> +  compatible:
> +    enum:
> +      - ti,lmp92064
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency: true
> +
> +  shunt-resistor:

This is not a valid property name.
git grep shunt-resistor


> +    description: |
> +      Value of the shunt resistor (in µΩ) connected between INCP and INCN,
> +      across which current is measured. Used to provide correct scaling of the
> +      raw adc measurement.

s/adc/ADC/

> +
> +  reset-gpios:
> +    maxItems: 1
> +

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-04 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-04 13:42 [PATCH v1 1/2] dt-bindings:iio:adc: add documentation for TI LMP92064 controller Leonard Göhrs
2022-10-04 14:56 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).