diff mbox series

[3/4] dt-bindings: iio: imu: add bosch BNO055 serdev driver bindings

Message ID 20210715141742.15072-4-andrea.merello@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Jonathan Cameron
Headers show
Series Add support for Bosch BNO055 IMU | expand

Commit Message

Andrea Merello July 15, 2021, 2:17 p.m. UTC
Introduce new documentation file for the BNO055 serdev driver that will
be included in next patches of this same series

Signed-off-by: Andrea Merello <andrea.merello@iit.it>
Cc: Andrea Merello <andrea.merello@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Vlad Dogaru <vlad.dogaru@intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-iio@vger.kernel.org
---
 .../bindings/iio/imu/bosch,bno055-serial.yaml | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml

Comments

Jonathan Cameron July 17, 2021, 3:39 p.m. UTC | #1
On Thu, 15 Jul 2021 16:17:41 +0200
Andrea Merello <andrea.merello@gmail.com> wrote:

> Introduce new documentation file for the BNO055 serdev driver that will
dt bindings are for the device not the driver (so don't mention driver
in the binding or the patch description).

> be included in next patches of this same series
> 
> Signed-off-by: Andrea Merello <andrea.merello@iit.it>
> Cc: Andrea Merello <andrea.merello@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Vlad Dogaru <vlad.dogaru@intel.com>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-iio@vger.kernel.org
> ---
>  .../bindings/iio/imu/bosch,bno055-serial.yaml | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml
> new file mode 100644
> index 000000000000..743c784ebc94
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml

Better to have just one doc covering this interface and i2c if that gets added.

> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/imu/bosch,bno055-serial.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Serial-attached Bosch BNO055
> +
> +maintainers:
> +  - Jonathan Cameron <jic23@kernel.org>

That's just mean!  I have plenty of these to look after already! Joking
aside, you'd be a better maintainer for this than me as more likely
to pay attention.

> +
> +description: |
> +  Inertial Measurement Unit with Accelerometer, Gyroscope, Magnetometer and
> +  internal MCU for sensor fusion
> +  https://www.bosch-sensortec.com/products/smart-sensors/bno055/
> +
> +properties:
> +  compatible:
> +    enum:
> +     - bosch,bno055-serial
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> +   #include <dt-bindings/gpio/gpio.h>
> +   bno055 {

name needs to be the one for the device type found in the device tree spec or
if it's not there, something in same 'spirit'.  Probably imu here

> +      compatible = "bosch,bno055-serial";
Don't need the -serial. It will bind based on the bus this is under.
Speaking of which, it's normal to provide that bus info as part of the example.
See for example chemical/sensiron,scd30.yaml

> +      reset-gpios = <&gpio0 54 GPIO_ACTIVE_LOW>;
> +      clocks = <&imu_clk>;
> +   };
Andrea Merello July 19, 2021, 8:44 a.m. UTC | #2
Il giorno sab 17 lug 2021 alle ore 17:36 Jonathan Cameron
<jic23@kernel.org> ha scritto:
>
> On Thu, 15 Jul 2021 16:17:41 +0200
> Andrea Merello <andrea.merello@gmail.com> wrote:
>
> > Introduce new documentation file for the BNO055 serdev driver that will
> dt bindings are for the device not the driver (so don't mention driver
> in the binding or the patch description).

Ah, right

> > be included in next patches of this same series
> >
> > Signed-off-by: Andrea Merello <andrea.merello@iit.it>
> > Cc: Andrea Merello <andrea.merello@gmail.com>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Cc: Vlad Dogaru <vlad.dogaru@intel.com>
> > Cc: linux-kernel@vger.kernel.org
> > Cc: linux-iio@vger.kernel.org
> > ---
> >  .../bindings/iio/imu/bosch,bno055-serial.yaml | 40 +++++++++++++++++++
> >  1 file changed, 40 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml
> > new file mode 100644
> > index 000000000000..743c784ebc94
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml
>
> Better to have just one doc covering this interface and i2c if that gets added.

OK

> > @@ -0,0 +1,40 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/imu/bosch,bno055-serial.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Serial-attached Bosch BNO055
> > +
> > +maintainers:
> > +  - Jonathan Cameron <jic23@kernel.org>
>
> That's just mean!  I have plenty of these to look after already! Joking
> aside, you'd be a better maintainer for this than me as more likely
> to pay attention.

Ok. I was really embarrassed about this: didn't want to proclaim me as
a maintainer, neither I wanted me to decide something about you :)


> > +
> > +description: |
> > +  Inertial Measurement Unit with Accelerometer, Gyroscope, Magnetometer and
> > +  internal MCU for sensor fusion
> > +  https://www.bosch-sensortec.com/products/smart-sensors/bno055/
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +     - bosch,bno055-serial
> > +
> > +  reset-gpios:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > +   #include <dt-bindings/gpio/gpio.h>
> > +   bno055 {
>
> name needs to be the one for the device type found in the device tree spec or
> if it's not there, something in same 'spirit'.  Probably imu here

OK

> > +      compatible = "bosch,bno055-serial";
> Don't need the -serial. It will bind based on the bus this is under.
> Speaking of which, it's normal to provide that bus info as part of the example.
> See for example chemical/sensiron,scd30.yaml

OK

> > +      reset-gpios = <&gpio0 54 GPIO_ACTIVE_LOW>;
> > +      clocks = <&imu_clk>;
> > +   };
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml
new file mode 100644
index 000000000000..743c784ebc94
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/imu/bosch,bno055-serial.yaml
@@ -0,0 +1,40 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/imu/bosch,bno055-serial.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Serial-attached Bosch BNO055
+
+maintainers:
+  - Jonathan Cameron <jic23@kernel.org>
+
+description: |
+  Inertial Measurement Unit with Accelerometer, Gyroscope, Magnetometer and
+  internal MCU for sensor fusion
+  https://www.bosch-sensortec.com/products/smart-sensors/bno055/
+
+properties:
+  compatible:
+    enum:
+     - bosch,bno055-serial
+
+  reset-gpios:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+   #include <dt-bindings/gpio/gpio.h>
+   bno055 {
+      compatible = "bosch,bno055-serial";
+      reset-gpios = <&gpio0 54 GPIO_ACTIVE_LOW>;
+      clocks = <&imu_clk>;
+   };