devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings
@ 2021-01-21 15:56 Mike Looijmans
  2021-01-22 14:00 ` Rob Herring
  2021-01-23 15:38 ` Jonathan Cameron
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Looijmans @ 2021-01-21 15:56 UTC (permalink / raw)
  To: linux-iio
  Cc: Mike Looijmans, Jonathan Cameron, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Rob Herring, devicetree, linux-kernel

This adds the device-tree bindings for the Bosch Sensortec BMI088 IMU,
the accelerometer part.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>

---

Changes in v7:
Add additionalProperties
Change bmi088_accel to bmi088-accel
Add interrupt-names and adjust description

Changes in v6:
I't been almost a year since the last commit, sorry...
Fixed the yaml errors
Add interrupt, vdd and vddio properties

Changes in v5:
submit together with driver code as patch series

Changes in v2:
convert to yaml format

 .../bindings/iio/accel/bosch,bmi088.yaml      | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml

diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
new file mode 100644
index 000000000000..db5dbaf80fa2
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/accel/bosch,bmi088.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bosch BMI088 IMU accelerometer part
+
+maintainers:
+  - Mike Looijmans <mike.looijmans@topic.nl>
+
+description: |
+  Acceleration part of the IMU sensor with an SPI interface
+  Specifications about the sensor can be found at:
+    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi088-ds001.pdf
+
+properties:
+  compatible:
+    enum:
+      - bosch,bmi088-accel
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+
+  vddio-supply: true
+
+  interrupts:
+    minItems: 1
+    maxItems: 2
+    description: |
+      Type should be either IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_LEVEL_LOW.
+      Two configurable interrupt lines exist.
+
+  interrupt-names:
+    description: Specify which interrupt line is in use.
+    items:
+      enum:
+        - INT1
+        - INT2
+    minItems: 1
+    maxItems: 2
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    spi {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      bmi088-accel@1 {
+        compatible = "bosch,bmi088-accel";
+        reg = <1>;
+        spi-max-frequency = <10000000>;
+        interrupt-parent = <&gpio6>;
+        interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
+        interrupt-names = "INT2";
+      };
+    };
+...
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings
  2021-01-21 15:56 [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings Mike Looijmans
@ 2021-01-22 14:00 ` Rob Herring
  2021-01-23 15:38 ` Jonathan Cameron
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-01-22 14:00 UTC (permalink / raw)
  To: Mike Looijmans
  Cc: linux-kernel, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	linux-iio, Peter Meerwald-Stadler, devicetree

On Thu, 21 Jan 2021 16:56:58 +0100, Mike Looijmans wrote:
> This adds the device-tree bindings for the Bosch Sensortec BMI088 IMU,
> the accelerometer part.
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> 
> ---
> 
> Changes in v7:
> Add additionalProperties
> Change bmi088_accel to bmi088-accel
> Add interrupt-names and adjust description
> 
> Changes in v6:
> I't been almost a year since the last commit, sorry...
> Fixed the yaml errors
> Add interrupt, vdd and vddio properties
> 
> Changes in v5:
> submit together with driver code as patch series
> 
> Changes in v2:
> convert to yaml format
> 
>  .../bindings/iio/accel/bosch,bmi088.yaml      | 66 +++++++++++++++++++
>  1 file changed, 66 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.example.dt.yaml: bmi088-accel@1: 'spi-max-frequency' does not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml

See https://patchwork.ozlabs.org/patch/1429940

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings
  2021-01-21 15:56 [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings Mike Looijmans
  2021-01-22 14:00 ` Rob Herring
@ 2021-01-23 15:38 ` Jonathan Cameron
       [not found]   ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.31062d28-ea32-4cba-9e19-a7434c115d8e@emailsignatures365.codetwo.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2021-01-23 15:38 UTC (permalink / raw)
  To: Mike Looijmans
  Cc: linux-iio, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, devicetree, linux-kernel

On Thu, 21 Jan 2021 16:56:58 +0100
Mike Looijmans <mike.looijmans@topic.nl> wrote:

> This adds the device-tree bindings for the Bosch Sensortec BMI088 IMU,
> the accelerometer part.
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Just the issue the build bot found.  Otherwise looks good to me.

Jonathan

> 
> ---
> 
> Changes in v7:
> Add additionalProperties
> Change bmi088_accel to bmi088-accel
> Add interrupt-names and adjust description
> 
> Changes in v6:
> I't been almost a year since the last commit, sorry...
> Fixed the yaml errors
> Add interrupt, vdd and vddio properties
> 
> Changes in v5:
> submit together with driver code as patch series
> 
> Changes in v2:
> convert to yaml format
> 
>  .../bindings/iio/accel/bosch,bmi088.yaml      | 66 +++++++++++++++++++
>  1 file changed, 66 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> new file mode 100644
> index 000000000000..db5dbaf80fa2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/accel/bosch,bmi088.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Bosch BMI088 IMU accelerometer part
> +
> +maintainers:
> +  - Mike Looijmans <mike.looijmans@topic.nl>
> +
> +description: |
> +  Acceleration part of the IMU sensor with an SPI interface
> +  Specifications about the sensor can be found at:
> +    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi088-ds001.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - bosch,bmi088-accel
> +
> +  reg:
> +    maxItems: 1
> +
> +  vdd-supply: true
> +
> +  vddio-supply: true
> +
> +  interrupts:
> +    minItems: 1
> +    maxItems: 2
> +    description: |
> +      Type should be either IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_LEVEL_LOW.
> +      Two configurable interrupt lines exist.
> +
> +  interrupt-names:
> +    description: Specify which interrupt line is in use.
> +    items:
> +      enum:
> +        - INT1
> +        - INT2
> +    minItems: 1
> +    maxItems: 2

As per Rob's build bot you need.

spi-max-frequency: true

If that's all that comes up and Rob is happy with this I can fix that up whilst
applying.  Please try to run the checks suggested in Rob's build bot message
before submitting binding patches though.


> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    spi {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +      bmi088-accel@1 {
> +        compatible = "bosch,bmi088-accel";
> +        reg = <1>;
> +        spi-max-frequency = <10000000>;
> +        interrupt-parent = <&gpio6>;
> +        interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
> +        interrupt-names = "INT2";
> +      };
> +    };
> +...


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings
       [not found]     ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.19976ff0-2a49-43f4-afd2-1dfd0965f697@emailsignatures365.codetwo.com>
@ 2021-01-25  7:53       ` Mike Looijmans
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Looijmans @ 2021-01-25  7:53 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, devicetree, linux-kernel

See below


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@topicproducts.com
W: www.topicproducts.com

Please consider the environment before printing this e-mail
On 23-01-2021 16:38, Jonathan Cameron wrote:
> On Thu, 21 Jan 2021 16:56:58 +0100
> Mike Looijmans <mike.looijmans@topic.nl> wrote:
>
>> This adds the device-tree bindings for the Bosch Sensortec BMI088 IMU,
>> the accelerometer part.
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> Just the issue the build bot found.  Otherwise looks good to me.
>
> Jonathan
>
>> ---
>>
>> Changes in v7:
>> Add additionalProperties
>> Change bmi088_accel to bmi088-accel
>> Add interrupt-names and adjust description
>>
>> Changes in v6:
>> I't been almost a year since the last commit, sorry...
>> Fixed the yaml errors
>> Add interrupt, vdd and vddio properties
>>
>> Changes in v5:
>> submit together with driver code as patch series
>>
>> Changes in v2:
>> convert to yaml format
>>
>>   .../bindings/iio/accel/bosch,bmi088.yaml      | 66 +++++++++++++++++++
>>   1 file changed, 66 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
>> new file mode 100644
>> index 000000000000..db5dbaf80fa2
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
>> @@ -0,0 +1,66 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/iio/accel/bosch,bmi088.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Bosch BMI088 IMU accelerometer part
>> +
>> +maintainers:
>> +  - Mike Looijmans <mike.looijmans@topic.nl>
>> +
>> +description: |
>> +  Acceleration part of the IMU sensor with an SPI interface
>> +  Specifications about the sensor can be found at:
>> +    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi088-ds001.pdf
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - bosch,bmi088-accel
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  vdd-supply: true
>> +
>> +  vddio-supply: true
>> +
>> +  interrupts:
>> +    minItems: 1
>> +    maxItems: 2
>> +    description: |
>> +      Type should be either IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_LEVEL_LOW.
>> +      Two configurable interrupt lines exist.
>> +
>> +  interrupt-names:
>> +    description: Specify which interrupt line is in use.
>> +    items:
>> +      enum:
>> +        - INT1
>> +        - INT2
>> +    minItems: 1
>> +    maxItems: 2
> As per Rob's build bot you need.
>
> spi-max-frequency: true
>
> If that's all that comes up and Rob is happy with this I can fix that up whilst
> applying.  Please try to run the checks suggested in Rob's build bot message
> before submitting binding patches though.

There'll be a v8 it seems, so I've already added it. Seems that I need 
to upgrade those definition files every day...

>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +    spi {
>> +      #address-cells = <1>;
>> +      #size-cells = <0>;
>> +      bmi088-accel@1 {
>> +        compatible = "bosch,bmi088-accel";
>> +        reg = <1>;
>> +        spi-max-frequency = <10000000>;
>> +        interrupt-parent = <&gpio6>;
>> +        interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
>> +        interrupt-names = "INT2";
>> +      };
>> +    };
>> +...


-- 
Mike Looijmans


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-25  7:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-21 15:56 [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings Mike Looijmans
2021-01-22 14:00 ` Rob Herring
2021-01-23 15:38 ` Jonathan Cameron
     [not found]   ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.31062d28-ea32-4cba-9e19-a7434c115d8e@emailsignatures365.codetwo.com>
     [not found]     ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.19976ff0-2a49-43f4-afd2-1dfd0965f697@emailsignatures365.codetwo.com>
2021-01-25  7:53       ` Mike Looijmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).