[PATCH v2 2/4] dt-bindings: iio: adc: Add the GE HealthCare PMC ADC

Herve Codina posted 4 patches 1 month, 3 weeks ago
[PATCH v2 2/4] dt-bindings: iio: adc: Add the GE HealthCare PMC ADC
Posted by Herve Codina 1 month, 3 weeks ago
The GE HealthCare PMC Analog to Digital Converter (ADC) is a 16-Channel
(voltage and current), 16-Bit ADC with an I2C Interface.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 .../bindings/iio/adc/gehc,pmc-adc.yaml        | 86 +++++++++++++++++++
 include/dt-bindings/iio/adc/gehc,pmc-adc.h    | 10 +++
 2 files changed, 96 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml
 create mode 100644 include/dt-bindings/iio/adc/gehc,pmc-adc.h

diff --git a/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml b/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml
new file mode 100644
index 000000000000..2cea7c104a26
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/gehc,pmc-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GE HealthCare PMC Analog to Digital Converter (ADC)
+
+maintainers:
+  - Herve Codina <herve.codina@bootlin.com>
+
+description:
+  The GE HealthCare PMC ADC is a 16-Channel (voltage and current), 16-Bit ADC
+  with an I2C Interface.
+
+properties:
+  compatible:
+    const: gehc,pmc-adc
+
+  reg:
+    maxItems: 1
+
+  vdd-supply:
+    description:
+      Regulator for the VDD power supply.
+
+  vdda-supply:
+    description:
+      Regulator for the VDD analog (VDDA) power supply.
+
+  vddio-supply:
+    description:
+      Regulator for the VDD IO (VDDIO) power supply.
+
+  vref-supply:
+    description:
+      Regulator for the voltage reference power supply.
+
+  clocks:
+    maxItems: 1
+    description:
+      The component uses an external oscillator (osc) if an external oscillator
+      is connected to its clock pins. Otherwise, it uses an internal reference
+      clock.
+
+  clock-names:
+    items:
+      - const: osc
+
+  "#io-channel-cells":
+    const: 2
+    description: |
+      The first cell is the channel type (dt-bindings/iio/adc/gehc,pmc-adc.h
+      defines these values):
+       - 0: voltage
+       - 1: current
+      The second cell is the channel number from 0 to 15.
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+  - vdda-supply
+  - vddio-supply
+  - vref-supply
+  - '#io-channel-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@14 {
+            compatible = "gehc,pmc-adc";
+            reg = <0x14>;
+            vdd-supply = <&reg_vdd>;
+            vdda-supply = <&reg_vdda>;
+            vddio-supply = <&reg_vddio>;
+            vref-supply = <&reg_vref>;
+            #io-channel-cells = <2>;
+        };
+    };
+...
diff --git a/include/dt-bindings/iio/adc/gehc,pmc-adc.h b/include/dt-bindings/iio/adc/gehc,pmc-adc.h
new file mode 100644
index 000000000000..2f291e3c76ae
--- /dev/null
+++ b/include/dt-bindings/iio/adc/gehc,pmc-adc.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+
+#ifndef _DT_BINDINGS_IIO_ADC_GEHC_PMC_ADC_H
+#define _DT_BINDINGS_IIO_ADC_GEHC_PMC_ADC_H
+
+/* ADC channel type */
+#define GEHC_PMC_ADC_VOLTAGE	0
+#define GEHC_PMC_ADC_CURRENT	1
+
+#endif
-- 
2.46.1
Re: [PATCH v2 2/4] dt-bindings: iio: adc: Add the GE HealthCare PMC ADC
Posted by Conor Dooley 1 month, 3 weeks ago
On Thu, Oct 03, 2024 at 01:46:39PM +0200, Herve Codina wrote:
> The GE HealthCare PMC Analog to Digital Converter (ADC) is a 16-Channel
> (voltage and current), 16-Bit ADC with an I2C Interface.
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Re: [PATCH v2 2/4] dt-bindings: iio: adc: Add the GE HealthCare PMC ADC
Posted by Ian Ray 1 month, 3 weeks ago
On Thu, Oct 03, 2024 at 01:46:39PM +0200, Herve Codina wrote:
> 
> WARNING: This email originated from outside of GE HealthCare. Please validate the sender's email address before clicking on links or attachments as they may not be safe.
> 
> The GE HealthCare PMC Analog to Digital Converter (ADC) is a 16-Channel
> (voltage and current), 16-Bit ADC with an I2C Interface.
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>

Tested-by: Ian Ray <ian.ray@gehealthcare.com>

> ---
>  .../bindings/iio/adc/gehc,pmc-adc.yaml        | 86 +++++++++++++++++++
>  include/dt-bindings/iio/adc/gehc,pmc-adc.h    | 10 +++
>  2 files changed, 96 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml
>  create mode 100644 include/dt-bindings/iio/adc/gehc,pmc-adc.h
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml b/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml
> new file mode 100644
> index 000000000000..2cea7c104a26
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml
> @@ -0,0 +1,86 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fiio%2Fadc%2Fgehc%2Cpmc-adc.yaml%23&data=05%7C02%7Cian.ray%40gehealthcare.com%7C29c6b87aecab477476ef08dce3a11117%7C9a309606d6ec4188a28a298812b4bbbf%7C0%7C0%7C638635528128598570%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=SDlnZF05zDF5iYE2X%2BsDV9BKN73B2rc5cAaPOJVY%2BrA%3D&reserved=0
> +$schema: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&data=05%7C02%7Cian.ray%40gehealthcare.com%7C29c6b87aecab477476ef08dce3a11117%7C9a309606d6ec4188a28a298812b4bbbf%7C0%7C0%7C638635528128610679%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=FbLudkkL4uUu2oTjkGLe7SFCI%2B5kXRCNhBPRcess0hc%3D&reserved=0
> +
> +title: GE HealthCare PMC Analog to Digital Converter (ADC)
> +
> +maintainers:
> +  - Herve Codina <herve.codina@bootlin.com>
> +
> +description:
> +  The GE HealthCare PMC ADC is a 16-Channel (voltage and current), 16-Bit ADC
> +  with an I2C Interface.
> +
> +properties:
> +  compatible:
> +    const: gehc,pmc-adc
> +
> +  reg:
> +    maxItems: 1
> +
> +  vdd-supply:
> +    description:
> +      Regulator for the VDD power supply.
> +
> +  vdda-supply:
> +    description:
> +      Regulator for the VDD analog (VDDA) power supply.
> +
> +  vddio-supply:
> +    description:
> +      Regulator for the VDD IO (VDDIO) power supply.
> +
> +  vref-supply:
> +    description:
> +      Regulator for the voltage reference power supply.
> +
> +  clocks:
> +    maxItems: 1
> +    description:
> +      The component uses an external oscillator (osc) if an external oscillator
> +      is connected to its clock pins. Otherwise, it uses an internal reference
> +      clock.
> +
> +  clock-names:
> +    items:
> +      - const: osc
> +
> +  "#io-channel-cells":
> +    const: 2
> +    description: |
> +      The first cell is the channel type (dt-bindings/iio/adc/gehc,pmc-adc.h
> +      defines these values):
> +       - 0: voltage
> +       - 1: current
> +      The second cell is the channel number from 0 to 15.
> +
> +required:
> +  - compatible
> +  - reg
> +  - vdd-supply
> +  - vdda-supply
> +  - vddio-supply
> +  - vref-supply
> +  - '#io-channel-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adc@14 {
> +            compatible = "gehc,pmc-adc";
> +            reg = <0x14>;
> +            vdd-supply = <&reg_vdd>;
> +            vdda-supply = <&reg_vdda>;
> +            vddio-supply = <&reg_vddio>;
> +            vref-supply = <&reg_vref>;
> +            #io-channel-cells = <2>;
> +        };
> +    };
> +...
> diff --git a/include/dt-bindings/iio/adc/gehc,pmc-adc.h b/include/dt-bindings/iio/adc/gehc,pmc-adc.h
> new file mode 100644
> index 000000000000..2f291e3c76ae
> --- /dev/null
> +++ b/include/dt-bindings/iio/adc/gehc,pmc-adc.h
> @@ -0,0 +1,10 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +
> +#ifndef _DT_BINDINGS_IIO_ADC_GEHC_PMC_ADC_H
> +#define _DT_BINDINGS_IIO_ADC_GEHC_PMC_ADC_H
> +
> +/* ADC channel type */
> +#define GEHC_PMC_ADC_VOLTAGE   0
> +#define GEHC_PMC_ADC_CURRENT   1
> +
> +#endif
> --
> 2.46.1
> 
>