Message ID | 20191209203248.21555-2-u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iio: adc: add support for ltc2496 | expand |
On Mon, 9 Dec 2019 21:32:46 +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> Thanks for figuring out what was wrong and fixing it up. I've made a couple of small tweaks whilst applying. See below. Applied to the togreg branch of iio.git and pushed out as testing. I'm not planning to do a pull request until at least next weekend so plenty of time if a DT maintainer wants to take another look. Thanks, Jonathan > --- > .../bindings/iio/adc/lltc,ltc2496.yaml | 47 +++++++++++++++++++ > 1 file changed, 47 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..195c8c8f2f4c > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml > @@ -0,0 +1,47 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%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 > + > +maintainers: > + - Lars-Peter Clausen <lars@metafoo.de> > + - Michael Hennerich <Michael.Hennerich@analog.com> > + - Stefan Popa <stefan.popa@analog.com> > + > +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 dropped the "by the chip" as this is also about the wiring on the board. If it were just the chip, it could be put in the driver. The unknown bit is if there is some other reason why it might need to be set lower than the maximum. > + > +required: > + - compatible > + - vref-supply > + - reg > + > +examples: > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + adc@0 { > + compatible = "lltc,ltc2496"; You can't easily see it here, but this is a mixture of spaces and tabs. Should be all spaces. I've tidied that up. > + reg = <0>; > + vref-supply = <<c2496_reg>; > + spi-max-frequency = <2000000>; > + }; > + };
Hello Jonathan, On Sun, Dec 15, 2019 at 11:49:58AM +0000, Jonathan Cameron wrote: > On Mon, 9 Dec 2019 21:32:46 +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> > Thanks for figuring out what was wrong and fixing it up. It wasn't done primarily to do you a favour :-) > > + spi-max-frequency: > > + description: maximal spi bus frequency supported by the chip > > dropped the "by the chip" as this is also about the wiring on the board. If it > were just the chip, it could be put in the driver. The unknown bit is > if there is some other reason why it might need to be set lower than the maximum. fine for me. > > +required: > > + - compatible > > + - vref-supply > > + - reg > > + > > +examples: > > + - | > > + spi { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + adc@0 { > > + compatible = "lltc,ltc2496"; > You can't easily see it here, but this is a mixture of spaces > and tabs. Should be all spaces. I've tidied that up. I did that on purpose, spaces to have the needed indention for the yaml syntax and then tabs for dts indention (as done in the dts itself, too). I thought this to be the right mix, but this was my first yaml binding, so you're probably right. Best regards and thanks Uwe
On Mon, 16 Dec 2019 09:37:36 +0100 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > Hello Jonathan, > > On Sun, Dec 15, 2019 at 11:49:58AM +0000, Jonathan Cameron wrote: > > On Mon, 9 Dec 2019 21:32:46 +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> > > Thanks for figuring out what was wrong and fixing it up. > > It wasn't done primarily to do you a favour :-) > > > > + spi-max-frequency: > > > + description: maximal spi bus frequency supported by the chip > > > > dropped the "by the chip" as this is also about the wiring on the board. If it > > were just the chip, it could be put in the driver. The unknown bit is > > if there is some other reason why it might need to be set lower than the maximum. > > fine for me. > > > > +required: > > > + - compatible > > > + - vref-supply > > > + - reg > > > + > > > +examples: > > > + - | > > > + spi { > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + adc@0 { > > > + compatible = "lltc,ltc2496"; > > You can't easily see it here, but this is a mixture of spaces > > and tabs. Should be all spaces. I've tidied that up. > > I did that on purpose, spaces to have the needed indention for the yaml > syntax and then tabs for dts indention (as done in the dts itself, too). > I thought this to be the right mix, but this was my first yaml binding, > so you're probably right. I'll be honest, I'm far from sure on this. I usually rely on Rob moaning about it if it's wrong :) Oh well. What's there builds. If we get a 'fix' later then so be it. Thanks, Jonathan > > Best regards and thanks > Uwe >
Hello Jonathan, On Mon, Dec 23, 2019 at 05:58:54PM +0000, Jonathan Cameron wrote: > On Mon, 16 Dec 2019 09:37:36 +0100 > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > > > Hello Jonathan, > > > > On Sun, Dec 15, 2019 at 11:49:58AM +0000, Jonathan Cameron wrote: > > > On Mon, 9 Dec 2019 21:32:46 +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> > > > Thanks for figuring out what was wrong and fixing it up. > > > > It wasn't done primarily to do you a favour :-) > > > > > > + spi-max-frequency: > > > > + description: maximal spi bus frequency supported by the chip > > > > > > dropped the "by the chip" as this is also about the wiring on the board. If it > > > were just the chip, it could be put in the driver. The unknown bit is > > > if there is some other reason why it might need to be set lower than the maximum. > > > > fine for me. > > > > > > +required: > > > > + - compatible > > > > + - vref-supply > > > > + - reg > > > > + > > > > +examples: > > > > + - | > > > > + spi { > > > > + #address-cells = <1>; > > > > + #size-cells = <0>; > > > > + > > > > + adc@0 { > > > > + compatible = "lltc,ltc2496"; > > > You can't easily see it here, but this is a mixture of spaces > > > and tabs. Should be all spaces. I've tidied that up. > > > > I did that on purpose, spaces to have the needed indention for the yaml > > syntax and then tabs for dts indention (as done in the dts itself, too). > > I thought this to be the right mix, but this was my first yaml binding, > > so you're probably right. > > I'll be honest, I'm far from sure on this. > > I usually rely on Rob moaning about it if it's wrong :) > > Oh well. What's there builds. If we get a 'fix' later then so be it. I found my commits in your tree (at https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/log/?h=testing) and wonder why they don't appear in next. IMHO it would be good to have some exposure there to give more people the opportunity to moan. Is this a mistake that your tree is not included in next? I assume being in your testing branch means I can reasonably expect they will go into 5.6-rc1? Best regards Uwe
On Thu, 9 Jan 2020 21:59:54 +0100 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > Hello Jonathan, > > On Mon, Dec 23, 2019 at 05:58:54PM +0000, Jonathan Cameron wrote: > > On Mon, 16 Dec 2019 09:37:36 +0100 > > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > > > > > Hello Jonathan, > > > > > > On Sun, Dec 15, 2019 at 11:49:58AM +0000, Jonathan Cameron wrote: > > > > On Mon, 9 Dec 2019 21:32:46 +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> > > > > Thanks for figuring out what was wrong and fixing it up. > > > > > > It wasn't done primarily to do you a favour :-) > > > > > > > > + spi-max-frequency: > > > > > + description: maximal spi bus frequency supported by the chip > > > > > > > > dropped the "by the chip" as this is also about the wiring on the board. If it > > > > were just the chip, it could be put in the driver. The unknown bit is > > > > if there is some other reason why it might need to be set lower than the maximum. > > > > > > fine for me. > > > > > > > > +required: > > > > > + - compatible > > > > > + - vref-supply > > > > > + - reg > > > > > + > > > > > +examples: > > > > > + - | > > > > > + spi { > > > > > + #address-cells = <1>; > > > > > + #size-cells = <0>; > > > > > + > > > > > + adc@0 { > > > > > + compatible = "lltc,ltc2496"; > > > > You can't easily see it here, but this is a mixture of spaces > > > > and tabs. Should be all spaces. I've tidied that up. > > > > > > I did that on purpose, spaces to have the needed indention for the yaml > > > syntax and then tabs for dts indention (as done in the dts itself, too). > > > I thought this to be the right mix, but this was my first yaml binding, > > > so you're probably right. > > > > I'll be honest, I'm far from sure on this. > > > > I usually rely on Rob moaning about it if it's wrong :) > > > > Oh well. What's there builds. If we get a 'fix' later then so be it. > > I found my commits in your tree (at > https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/log/?h=testing) > and wonder why they don't appear in next. IMHO it would be good to have > some exposure there to give more people the opportunity to moan. Is this > a mistake that your tree is not included in next? > > I assume being in your testing branch means I can reasonably expect they > will go into 5.6-rc1? Given timing yes. I tend to do last pull request 1-2 weeks before the merge window opens. Greg KH takes IIO through his staging tree. One day that might change but for now that's how we do it. Note that I'll carry on taking things into the togreg branch (which first becomes visible as testing) after that, but they'll not go anywhere until after the merge window. There was a slight delay this time around, but Greg took the pull request this morning so they should be in Linux-next on Monday. They are indeed heading for 5.6-rc1. Thanks, Jonathan > > Best regards > Uwe >
Hello Jonathan, On Fri, Jan 10, 2020 at 10:01:48AM +0000, Jonathan Cameron wrote: > On Thu, 9 Jan 2020 21:59:54 +0100 > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > > I found my commits in your tree (at > > https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/log/?h=testing) > > and wonder why they don't appear in next. IMHO it would be good to have > > some exposure there to give more people the opportunity to moan. Is this > > a mistake that your tree is not included in next? > > > > I assume being in your testing branch means I can reasonably expect they > > will go into 5.6-rc1? > > Given timing yes. I tend to do last pull request 1-2 weeks before the merge window > opens. Greg KH takes IIO through his staging tree. One day that might change > but for now that's how we do it. Note that I'll carry on taking things into > the togreg branch (which first becomes visible as testing) after that, but they'll > not go anywhere until after the merge window. > > There was a slight delay this time around, but Greg took the pull request this > morning so they should be in Linux-next on Monday. > > They are indeed heading for 5.6-rc1. Thanks for your explanation and taking the patches. 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..195c8c8f2f4c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%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 + +maintainers: + - Lars-Peter Clausen <lars@metafoo.de> + - Michael Hennerich <Michael.Hennerich@analog.com> + - Stefan Popa <stefan.popa@analog.com> + +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: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + 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 | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml