Message ID | 20201014104926.688666-1-rmfrfs@gmail.com |
---|---|
State | Accepted |
Commit | c95003d895bde422e0daedab868d487dc40f84d4 |
Headers | show |
Series | [v2] dt-bindings: fxas21002c: convert bindings to yaml | expand |
On Wed, 14 Oct 2020 11:49:26 +0100, Rui Miguel Silva wrote: > Convert fxas21002c gyroscope sensor bindings documentation to > yaml schema, remove the textual bindings document and update MAINTAINERS entry. > > Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> > --- > v1 -> v2: > Jonathan Cameron: > https://lore.kernel.org/linux-iio/20201013153431.000052c9@huawei.com/ > - remove Unit from tittle > - reword interrupts description > - drop interrupt-name description > - add spi example and bindings > - remove vddxx from required list > > .../bindings/iio/gyroscope/nxp,fxas21002c.txt | 31 ------ > .../iio/gyroscope/nxp,fxas21002c.yaml | 95 +++++++++++++++++++ > MAINTAINERS | 2 +- > 3 files changed, 96 insertions(+), 32 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt > create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml > Reviewed-by: Rob Herring <robh@kernel.org>
On Fri, 16 Oct 2020 13:57:07 -0500 Rob Herring <robh@kernel.org> wrote: > On Wed, 14 Oct 2020 11:49:26 +0100, Rui Miguel Silva wrote: > > Convert fxas21002c gyroscope sensor bindings documentation to > > yaml schema, remove the textual bindings document and update MAINTAINERS entry. > > > > Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> > > --- > > v1 -> v2: > > Jonathan Cameron: > > https://lore.kernel.org/linux-iio/20201013153431.000052c9@huawei.com/ > > - remove Unit from tittle > > - reword interrupts description > > - drop interrupt-name description > > - add spi example and bindings > > - remove vddxx from required list > > > > .../bindings/iio/gyroscope/nxp,fxas21002c.txt | 31 ------ > > .../iio/gyroscope/nxp,fxas21002c.yaml | 95 +++++++++++++++++++ > > MAINTAINERS | 2 +- > > 3 files changed, 96 insertions(+), 32 deletions(-) > > delete mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt > > create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml > > > > Reviewed-by: Rob Herring <robh@kernel.org> Nice patch. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to maybe poke at. I'm still not 100% sure if unevaluatedProperties or additionalProperties makes sense here, but as Rob's happy, I'm happy :) Thanks, Jonathan
Hi, On Sun, Oct 18, 2020 at 12:00:46PM +0100, Jonathan Cameron wrote: > On Fri, 16 Oct 2020 13:57:07 -0500 > Rob Herring <robh@kernel.org> wrote: > > > On Wed, 14 Oct 2020 11:49:26 +0100, Rui Miguel Silva wrote: > > > Convert fxas21002c gyroscope sensor bindings documentation to > > > yaml schema, remove the textual bindings document and update MAINTAINERS entry. > > > > > > Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> > > > --- > > > v1 -> v2: > > > Jonathan Cameron: > > > https://lore.kernel.org/linux-iio/20201013153431.000052c9@huawei.com/ > > > - remove Unit from tittle > > > - reword interrupts description > > > - drop interrupt-name description > > > - add spi example and bindings > > > - remove vddxx from required list > > > > > > .../bindings/iio/gyroscope/nxp,fxas21002c.txt | 31 ------ > > > .../iio/gyroscope/nxp,fxas21002c.yaml | 95 +++++++++++++++++++ > > > MAINTAINERS | 2 +- > > > 3 files changed, 96 insertions(+), 32 deletions(-) > > > delete mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt > > > create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml > > > > > > > Reviewed-by: Rob Herring <robh@kernel.org> > > Nice patch. > > Applied to the togreg branch of iio.git and pushed out as testing for the > autobuilders to maybe poke at. > > I'm still not 100% sure if unevaluatedProperties or additionalProperties makes > sense here, but as Rob's happy, I'm happy :) > > Thanks, Thanks for the review and taking this. ------ Cheers, Rui
On Sun, Oct 18, 2020 at 6:00 AM Jonathan Cameron <jic23@kernel.org> wrote: > > On Fri, 16 Oct 2020 13:57:07 -0500 > Rob Herring <robh@kernel.org> wrote: > > > On Wed, 14 Oct 2020 11:49:26 +0100, Rui Miguel Silva wrote: > > > Convert fxas21002c gyroscope sensor bindings documentation to > > > yaml schema, remove the textual bindings document and update MAINTAINERS entry. > > > > > > Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> > > > --- > > > v1 -> v2: > > > Jonathan Cameron: > > > https://lore.kernel.org/linux-iio/20201013153431.000052c9@huawei.com/ > > > - remove Unit from tittle > > > - reword interrupts description > > > - drop interrupt-name description > > > - add spi example and bindings > > > - remove vddxx from required list > > > > > > .../bindings/iio/gyroscope/nxp,fxas21002c.txt | 31 ------ > > > .../iio/gyroscope/nxp,fxas21002c.yaml | 95 +++++++++++++++++++ > > > MAINTAINERS | 2 +- > > > 3 files changed, 96 insertions(+), 32 deletions(-) > > > delete mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt > > > create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml > > > > > > > Reviewed-by: Rob Herring <robh@kernel.org> > > Nice patch. > > Applied to the togreg branch of iio.git and pushed out as testing for the > autobuilders to maybe poke at. > > I'm still not 100% sure if unevaluatedProperties or additionalProperties makes > sense here, but as Rob's happy, I'm happy :) It could be additionalProperties instead if you want to fixup. Rob
diff --git a/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt b/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt deleted file mode 100644 index 465e104bbf14..000000000000 --- a/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt +++ /dev/null @@ -1,31 +0,0 @@ -* NXP FXAS21002C Gyroscope device tree bindings - -http://www.nxp.com/products/sensors/gyroscopes/3-axis-digital-gyroscope:FXAS21002C - -Required properties: - - compatible : should be "nxp,fxas21002c" - - reg : the I2C address of the sensor or SPI chip select number for the - device. - - vdd-supply: phandle to the regulator that provides power to the sensor. - - vddio-supply: phandle to the regulator that provides power to the bus. - -Optional properties: - - reset-gpios : gpio used to reset the device, see gpio/gpio.txt - - interrupts : device support 2 interrupts, INT1 and INT2, - the interrupts can be triggered on rising or falling edges. - See interrupt-controller/interrupts.txt - - interrupt-names: should contain "INT1" or "INT2", the gyroscope interrupt - line in use. - - drive-open-drain: the interrupt/data ready line will be configured - as open drain, which is useful if several sensors share - the same interrupt line. This is a boolean property. - (This binding is taken from pinctrl/pinctrl-bindings.txt) - -Example: - -gyroscope@20 { - compatible = "nxp,fxas21002c"; - reg = <0x20>; - vdd-supply = <®_peri_3p15v>; - vddio-supply = <®_peri_3p15v>; -}; diff --git a/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml b/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml new file mode 100644 index 000000000000..2560458dc50b --- /dev/null +++ b/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/gyroscope/nxp,fxas21002c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP FXAS21002C Gyroscope + +maintainers: + - Rui Miguel Silva <rmfrfs@gmail.com> + +description: | + 3 axis digital gyroscope device with an I2C and SPI interface. + http://www.nxp.com/products/sensors/gyroscopes/3-axis-digital-gyroscope:FXAS21002C + +properties: + compatible: + const: nxp,fxas21002c + + reg: + maxItems: 1 + + vdd-supply: + description: Regulator that provides power to the sensor + + vddio-supply: + description: Regulator that provides power to the bus + + reset-gpios: + maxItems: 1 + description: GPIO connected to reset + + interrupts: + minItems: 1 + maxItems: 2 + description: Either interrupt may be triggered on rising or falling edges. + + interrupt-names: + minItems: 1 + maxItems: 2 + items: + enum: + - INT1 + - INT2 + + drive-open-drain: + type: boolean + description: the interrupt/data ready line will be configured as open drain, + which is useful if several sensors share the same interrupt + line. + + spi-max-frequency: + maximum: 2000000 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + gyroscope@20 { + compatible = "nxp,fxas21002c"; + reg = <0x20>; + + vdd-supply = <®_peri_3p15v>; + vddio-supply = <®_peri_3p15v>; + + interrupt-parent = <&gpio1>; + interrupts = <7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "INT1"; + }; + }; + spi0 { + #address-cells = <1>; + #size-cells = <0>; + + gyroscope@0 { + compatible = "nxp,fxas2102c"; + reg = <0x0>; + + spi-max-frequency = <2000000>; + + interrupt-parent = <&gpio2>; + interrupts = <7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "INT2"; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 6594f0966716..2e85e114c9c3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12469,7 +12469,7 @@ NXP FXAS21002C DRIVER M: Rui Miguel Silva <rmfrfs@gmail.com> L: linux-iio@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt +F: Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml F: drivers/iio/gyro/fxas21002c.h F: drivers/iio/gyro/fxas21002c_core.c F: drivers/iio/gyro/fxas21002c_i2c.c
Convert fxas21002c gyroscope sensor bindings documentation to yaml schema, remove the textual bindings document and update MAINTAINERS entry. Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> --- v1 -> v2: Jonathan Cameron: https://lore.kernel.org/linux-iio/20201013153431.000052c9@huawei.com/ - remove Unit from tittle - reword interrupts description - drop interrupt-name description - add spi example and bindings - remove vddxx from required list .../bindings/iio/gyroscope/nxp,fxas21002c.txt | 31 ------ .../iio/gyroscope/nxp,fxas21002c.yaml | 95 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 96 insertions(+), 32 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml -- 2.28.0