[v4,2/5] dt-bindings: iio: imu: bmi160: add regulators and mount-matrix
diff mbox series

Message ID 20200525164615.14962-3-jonathan.albrieux@gmail.com
State New
Headers show
Series
  • iio: imu: bmi160: added regulator and mount-matrix support
Related show

Commit Message

Jonathan Albrieux May 25, 2020, 4:46 p.m. UTC
Add vdd-supply and vddio-supply support.
Add mount-matrix support.

Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
---
 .../bindings/iio/imu/bosch,bmi160.yaml           | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Rob Herring May 29, 2020, 5:09 p.m. UTC | #1
On Mon, May 25, 2020 at 06:46:01PM +0200, Jonathan Albrieux wrote:
> Add vdd-supply and vddio-supply support.
> Add mount-matrix support.
> 
> Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
> ---
>  .../bindings/iio/imu/bosch,bmi160.yaml           | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> index 0d0ef84e22b9..cfe40dbcd723 100644
> --- a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> +++ b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> @@ -37,6 +37,17 @@ properties:
>        set if the specified interrupt pin should be configured as
>        open drain. If not set, defaults to push-pull.
>  
> +  vdd-supply:
> +    maxItems: 1

Supplies are always a single item, so don't need this.

> +    description: provide VDD power to the sensor.
> +
> +  vddio-supply:
> +    maxItems: 1
> +    description: provide VDD IO power to the sensor.
> +
> +  mount-matrix:
> +    description: an optional 3x3 mounting rotation matrix
> +
>  required:
>    - compatible
>    - reg
> @@ -52,9 +63,14 @@ examples:
>          bmi160@68 {
>                  compatible = "bosch,bmi160";
>                  reg = <0x68>;
> +                vdd-supply = <&pm8916_l17>;
> +                vddio-supply = <&pm8916_l6>;
>                  interrupt-parent = <&gpio4>;
>                  interrupts = <12 IRQ_TYPE_EDGE_RISING>;
>                  interrupt-names = "INT1";
> +                mount-matrix = "0", "1", "0",
> +                               "-1", "0", "0",
> +                               "0", "0", "1";
>          };
>      };
>    - |
> -- 
> 2.17.1
>
Jonathan Cameron May 31, 2020, 2:05 p.m. UTC | #2
On Fri, 29 May 2020 11:09:43 -0600
Rob Herring <robh@kernel.org> wrote:

> On Mon, May 25, 2020 at 06:46:01PM +0200, Jonathan Albrieux wrote:
> > Add vdd-supply and vddio-supply support.
> > Add mount-matrix support.
> > 
> > Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
> > ---
> >  .../bindings/iio/imu/bosch,bmi160.yaml           | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> > index 0d0ef84e22b9..cfe40dbcd723 100644
> > --- a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> > +++ b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
> > @@ -37,6 +37,17 @@ properties:
> >        set if the specified interrupt pin should be configured as
> >        open drain. If not set, defaults to push-pull.
> >  
> > +  vdd-supply:
> > +    maxItems: 1  
> 
> Supplies are always a single item, so don't need this.

Given this (and case below) were it outstanding for this patch I
fixed them up whilst applying rather than getting Jonathan to
go around again.

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> 
> > +    description: provide VDD power to the sensor.
> > +
> > +  vddio-supply:
> > +    maxItems: 1
> > +    description: provide VDD IO power to the sensor.
> > +
> > +  mount-matrix:
> > +    description: an optional 3x3 mounting rotation matrix
> > +
> >  required:
> >    - compatible
> >    - reg
> > @@ -52,9 +63,14 @@ examples:
> >          bmi160@68 {
> >                  compatible = "bosch,bmi160";
> >                  reg = <0x68>;
> > +                vdd-supply = <&pm8916_l17>;
> > +                vddio-supply = <&pm8916_l6>;
> >                  interrupt-parent = <&gpio4>;
> >                  interrupts = <12 IRQ_TYPE_EDGE_RISING>;
> >                  interrupt-names = "INT1";
> > +                mount-matrix = "0", "1", "0",
> > +                               "-1", "0", "0",
> > +                               "0", "0", "1";
> >          };
> >      };
> >    - |
> > -- 
> > 2.17.1
> >

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
index 0d0ef84e22b9..cfe40dbcd723 100644
--- a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
@@ -37,6 +37,17 @@  properties:
       set if the specified interrupt pin should be configured as
       open drain. If not set, defaults to push-pull.
 
+  vdd-supply:
+    maxItems: 1
+    description: provide VDD power to the sensor.
+
+  vddio-supply:
+    maxItems: 1
+    description: provide VDD IO power to the sensor.
+
+  mount-matrix:
+    description: an optional 3x3 mounting rotation matrix
+
 required:
   - compatible
   - reg
@@ -52,9 +63,14 @@  examples:
         bmi160@68 {
                 compatible = "bosch,bmi160";
                 reg = <0x68>;
+                vdd-supply = <&pm8916_l17>;
+                vddio-supply = <&pm8916_l6>;
                 interrupt-parent = <&gpio4>;
                 interrupts = <12 IRQ_TYPE_EDGE_RISING>;
                 interrupt-names = "INT1";
+                mount-matrix = "0", "1", "0",
+                               "-1", "0", "0",
+                               "0", "0", "1";
         };
     };
   - |