Message ID | 20191121210007.25646-2-u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/3] iio: adc: ltc2496: provide device tree binding document | expand |
On Thu, 21 Nov 2019 22:00:05 +0100 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > The ADC only requires the standard stuff for spi devices and a reference > voltage. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Rob, even with the issues below fixed I can't build test this and get 'no schema found in file'. I can't seem to figure out why so if you could take a look, that would be great. Thanks, Jonathan > --- > .../bindings/iio/adc/lltc,ltc2496.yaml | 37 +++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml > > diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml > new file mode 100644 > index 000000000000..af485abeabd6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml > @@ -0,0 +1,37 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2496.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Linear Technology / Analog Devices LTC2496 ADC > + > +properties: > + compatible: > + enum: > + - lltc,ltc2496 > + > + vref-supply: > + description: phandle to an external regulator providing the reference voltage > + allOf: > + - $ref: /schemas/types.yaml#/definitions/phandle > + > + reg: > + description: spi chipselect number according to the usual spi bindings > + > + spi-max-frequency: > + description: maximal spi bus frequency supported by the chip > + > +required: > + - compatible > + - vref-supply > + - reg > + > +examples: > + - | Missed this before trying to build test. Spaces used in DT not tabs, and this should be in an spi block. Please check the example verifies using the instructions in Documentation/devicetree/bindings/writing-bindings.rst Thanks, Jonathan > + adc@0 { > + compatible = "lltc,ltc2496"; > + reg = <0>; > + vref-supply = <<c2496_reg>; > + spi-max-frequency = <2000000>; > + };
Hello, On Sun, Dec 01, 2019 at 11:28:03AM +0000, Jonathan Cameron wrote: > On Thu, 21 Nov 2019 22:00:05 +0100 > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > > > The ADC only requires the standard stuff for spi devices and a reference > > voltage. > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > Rob, even with the issues below fixed I can't build test this and get > 'no schema found in file'. > > I can't seem to figure out why so if you could take a look, that would > be great. > > > [...] > > Missed this before trying to build test. > > Spaces used in DT not tabs, and this should be in an spi block. > > Please check the example verifies using the instructions in > Documentation/devicetree/bindings/writing-bindings.rst I'm not sure if it's me or Rob you are waiting for now. I just setup dt-schema stuff locally to find out what to improve. Best regards Uwe
On Mon, Dec 09, 2019 at 04:18:01PM +0100, Uwe Kleine-König wrote: > Hello, > > On Sun, Dec 01, 2019 at 11:28:03AM +0000, Jonathan Cameron wrote: > > On Thu, 21 Nov 2019 22:00:05 +0100 > > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > > > > > The ADC only requires the standard stuff for spi devices and a reference > > > voltage. > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > > > Rob, even with the issues below fixed I can't build test this and get > > 'no schema found in file'. > > > > I can't seem to figure out why so if you could take a look, that would > > be great. > > > > > [...] > > > > Missed this before trying to build test. > > > > Spaces used in DT not tabs, and this should be in an spi block. > > > > Please check the example verifies using the instructions in > > Documentation/devicetree/bindings/writing-bindings.rst > > I'm not sure if it's me or Rob you are waiting for now. > > I just setup dt-schema stuff locally to find out what to improve. I managed to make the dt check target happy and created a v4 with the result. Best regards Uwe
diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml new file mode 100644 index 000000000000..af485abeabd6 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2496.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Linear Technology / Analog Devices LTC2496 ADC + +properties: + compatible: + enum: + - lltc,ltc2496 + + vref-supply: + description: phandle to an external regulator providing the reference voltage + allOf: + - $ref: /schemas/types.yaml#/definitions/phandle + + reg: + description: spi chipselect number according to the usual spi bindings + + spi-max-frequency: + description: maximal spi bus frequency supported by the chip + +required: + - compatible + - vref-supply + - reg + +examples: + - | + adc@0 { + compatible = "lltc,ltc2496"; + reg = <0>; + vref-supply = <<c2496_reg>; + spi-max-frequency = <2000000>; + };
The ADC only requires the standard stuff for spi devices and a reference voltage. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- .../bindings/iio/adc/lltc,ltc2496.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml