[PATCH v1 06/13] dt-bindings: iio: add binding for BME680 driver

vamoirid posted 13 patches 1 month, 2 weeks ago
[PATCH v1 06/13] dt-bindings: iio: add binding for BME680 driver
Posted by vamoirid 1 month, 2 weeks ago
From: Vasileios Amoiridis <vassilisamir@gmail.com>

Add dt-binding for BME680 gas sensor device. The device incorporates as
well temperature, pressure and relative humidity sensors.

Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
---
 .../bindings/iio/chemical/bosch,bme680.yaml   | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml

diff --git a/Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml b/Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml
new file mode 100644
index 000000000000..e54df3afa7b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/chemical/bosch,bme680.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bosch BME680 Gas sensor
+
+maintainers:
+  - Vasileios Amoiridis <vassilisamir@gmail.com>
+
+description:
+  BME680 is a gas sensor which combines relative humidity, barometric pressure,
+  ambient temperature and gas (VOC - Volatile Organic Compounds) measurements.
+
+  https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf
+
+properties:
+  compatible:
+    const: bosch,bme680
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+  vddio-supply: true
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+  - vddio-supply
+
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        bme680@77 {
+            compatible = "bosch,bme680";
+            reg = <0x77>;
+            vddio-supply = <&vddio>;
+            vdd-supply = <&vdd>;
+        };
+    };
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        bme680@0 {
+            compatible = "bosch,bme680";
+            reg = <0>;
+            spi-max-frequency = <500000>;
+            vddio-supply = <&vddio>;
+            vdd-supply = <&vdd>;
+        };
+    };
-- 
2.43.0
Re: [PATCH v1 06/13] dt-bindings: iio: add binding for BME680 driver
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 10/10/2024 23:00, vamoirid wrote:
> From: Vasileios Amoiridis <vassilisamir@gmail.com>
> 
> Add dt-binding for BME680 gas sensor device. The device incorporates as
> well temperature, pressure and relative humidity sensors.
> 
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> ---
>  .../bindings/iio/chemical/bosch,bme680.yaml   | 64 +++++++++++++++++++
>  1 file changed, 64 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml

The device is already documented. You need to move it from trivial devices.

Best regards,
Krzysztof
Re: [PATCH v1 06/13] dt-bindings: iio: add binding for BME680 driver
Posted by Vasileios Aoiridis 1 month, 2 weeks ago
On Fri, Oct 11, 2024 at 08:51:00AM +0200, Krzysztof Kozlowski wrote:
> On 10/10/2024 23:00, vamoirid wrote:
> > From: Vasileios Amoiridis <vassilisamir@gmail.com>
> > 
> > Add dt-binding for BME680 gas sensor device. The device incorporates as
> > well temperature, pressure and relative humidity sensors.
> > 
> > Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> > ---
> >  .../bindings/iio/chemical/bosch,bme680.yaml   | 64 +++++++++++++++++++
> >  1 file changed, 64 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml
> 
> The device is already documented. You need to move it from trivial devices.
> 
> Best regards,
> Krzysztof
>

Hi Krzysztof!

Thanks for your time to have a look at this!

You mean to keep this new dt-binging and remove it from trivial devices?

Cheers,
Vasilis
Re: [PATCH v1 06/13] dt-bindings: iio: add binding for BME680 driver
Posted by Jonathan Cameron 1 month, 2 weeks ago
On Fri, 11 Oct 2024 20:44:51 +0200
Vasileios Aoiridis <vassilisamir@gmail.com> wrote:

> On Fri, Oct 11, 2024 at 08:51:00AM +0200, Krzysztof Kozlowski wrote:
> > On 10/10/2024 23:00, vamoirid wrote:  
> > > From: Vasileios Amoiridis <vassilisamir@gmail.com>
> > > 
> > > Add dt-binding for BME680 gas sensor device. The device incorporates as
> > > well temperature, pressure and relative humidity sensors.
> > > 
> > > Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> > > ---
> > >  .../bindings/iio/chemical/bosch,bme680.yaml   | 64 +++++++++++++++++++
> > >  1 file changed, 64 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml  
> > 
> > The device is already documented. You need to move it from trivial devices.
> > 
> > Best regards,
> > Krzysztof
> >  
> 
> Hi Krzysztof!
> 
> Thanks for your time to have a look at this!
> 
> You mean to keep this new dt-binging and remove it from trivial devices?
> 
Yes

> Cheers,
> Vasilis
>
Re: [PATCH v1 06/13] dt-bindings: iio: add binding for BME680 driver
Posted by Rob Herring (Arm) 1 month, 2 weeks ago
On Thu, 10 Oct 2024 23:00:23 +0200, vamoirid wrote:
> From: Vasileios Amoiridis <vassilisamir@gmail.com>
> 
> Add dt-binding for BME680 gas sensor device. The device incorporates as
> well temperature, pressure and relative humidity sensors.
> 
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> ---
>  .../bindings/iio/chemical/bosch,bme680.yaml   | 64 +++++++++++++++++++
>  1 file changed, 64 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/chemical/bosch,bme680.yaml
> 

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Warning: Duplicate compatible "bosch,bme680" found in schemas matching "$id":
	http://devicetree.org/schemas/iio/chemical/bosch,bme680.yaml#
	http://devicetree.org/schemas/trivial-devices.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/chemical/bosch,bme680.example.dtb: bme680@77: 'vdd-supply', 'vddio-supply' do not match any of the regexes: 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/trivial-devices.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/chemical/bosch,bme680.example.dtb: bme680@0: 'vdd-supply', 'vddio-supply' do not match any of the regexes: 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/trivial-devices.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241010210030.33309-7-vassilisamir@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.