Message ID | 20241001074618.350785-3-herve.codina@bootlin.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Add support for the GE HealthCare PMC ADC | expand |
On Tue, Oct 01, 2024 at 09:46:16AM +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> > --- > .../bindings/iio/adc/gehc,pmc-adc.yaml | 82 +++++++++++++++++++ > include/dt-bindings/iio/adc/gehc,pmc-adc.h | 10 +++ > 2 files changed, 92 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..6b2bb1309767 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml > @@ -0,0 +1,82 @@ > +# 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 > + > + clock-names: > + items: > + - const: osc Since there's no datasheet for me to look up, why is the clock optional? > + > + "#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 = <®_vdd>; > + vdda-supply = <®_vdda>; > + vddio-supply = <®_vddio>; > + vref-supply = <®_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 >
On Tue, 1 Oct 2024 17:18:30 +0100 Conor Dooley <conor@kernel.org> wrote: > On Tue, Oct 01, 2024 at 09:46:16AM +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> > > --- > > .../bindings/iio/adc/gehc,pmc-adc.yaml | 82 +++++++++++++++++++ > > include/dt-bindings/iio/adc/gehc,pmc-adc.h | 10 +++ ... > > + clocks: > > + maxItems: 1 > > + > > + clock-names: > > + items: > > + - const: osc > > Since there's no datasheet for me to look up, why is the clock optional? The component uses an external oscillator (osc) if an external oscillator is connected to its clock pins. Otherwise, it uses an internal reference clock. Best regards, Hervé
On Tue, Oct 01, 2024 at 06:46:02PM +0200, Herve Codina wrote: > On Tue, 1 Oct 2024 17:18:30 +0100 > Conor Dooley <conor@kernel.org> wrote: > > > On Tue, Oct 01, 2024 at 09:46:16AM +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> > > > --- > > > .../bindings/iio/adc/gehc,pmc-adc.yaml | 82 +++++++++++++++++++ > > > include/dt-bindings/iio/adc/gehc,pmc-adc.h | 10 +++ > ... > > > + clocks: > > > + maxItems: 1 > > > + > > > + clock-names: > > > + items: > > > + - const: osc > > > > Since there's no datasheet for me to look up, why is the clock optional? > > The component uses an external oscillator (osc) if an external oscillator is > connected to its clock pins. Otherwise, it uses an internal reference clock. Could you please add a description of the clock with this statement, given there's no datasheet or w/e linked here?
Hi Conor, On Tue, 1 Oct 2024 18:03:37 +0100 Conor Dooley <conor@kernel.org> wrote: > On Tue, Oct 01, 2024 at 06:46:02PM +0200, Herve Codina wrote: > > On Tue, 1 Oct 2024 17:18:30 +0100 > > Conor Dooley <conor@kernel.org> wrote: > > > > > On Tue, Oct 01, 2024 at 09:46:16AM +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> > > > > --- > > > > .../bindings/iio/adc/gehc,pmc-adc.yaml | 82 +++++++++++++++++++ > > > > include/dt-bindings/iio/adc/gehc,pmc-adc.h | 10 +++ > > ... > > > > + clocks: > > > > + maxItems: 1 > > > > + > > > > + clock-names: > > > > + items: > > > > + - const: osc > > > > > > Since there's no datasheet for me to look up, why is the clock optional? > > > > The component uses an external oscillator (osc) if an external oscillator is > > connected to its clock pins. Otherwise, it uses an internal reference clock. > > Could you please add a description of the clock with this statement, > given there's no datasheet or w/e linked here? Sure, I will add a description in the next iteration. There is no datasheet or any similar document available for this component. This is reason why I cannot add a link to this kind of dos. Best regards, Hervé
On Wed, Oct 02, 2024 at 09:04:53AM +0200, Herve Codina wrote: > Hi Conor, > > On Tue, 1 Oct 2024 18:03:37 +0100 > Conor Dooley <conor@kernel.org> wrote: > > > On Tue, Oct 01, 2024 at 06:46:02PM +0200, Herve Codina wrote: > > > On Tue, 1 Oct 2024 17:18:30 +0100 > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > On Tue, Oct 01, 2024 at 09:46:16AM +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> > > > > > --- > > > > > .../bindings/iio/adc/gehc,pmc-adc.yaml | 82 +++++++++++++++++++ > > > > > include/dt-bindings/iio/adc/gehc,pmc-adc.h | 10 +++ > > > ... > > > > > + clocks: > > > > > + maxItems: 1 > > > > > + > > > > > + clock-names: > > > > > + items: > > > > > + - const: osc > > > > > > > > Since there's no datasheet for me to look up, why is the clock optional? > > > > > > The component uses an external oscillator (osc) if an external oscillator is > > > connected to its clock pins. Otherwise, it uses an internal reference clock. > > > > Could you please add a description of the clock with this statement, > > given there's no datasheet or w/e linked here? > > Sure, I will add a description in the next iteration. > > There is no datasheet or any similar document available for this component. > This is reason why I cannot add a link to this kind of dos. Yeah, I had taken a look last night and couldn't find one, so I figured that this was the case.
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..6b2bb1309767 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/gehc,pmc-adc.yaml @@ -0,0 +1,82 @@ +# 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 + + 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 = <®_vdd>; + vdda-supply = <®_vdda>; + vddio-supply = <®_vddio>; + vref-supply = <®_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
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 | 82 +++++++++++++++++++ include/dt-bindings/iio/adc/gehc,pmc-adc.h | 10 +++ 2 files changed, 92 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