Message ID | 20241128232450.313862-2-vassilisamir@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | iio: pressure: bmp280: Minor cleanup | expand |
On Fri, Nov 29, 2024 at 12:24:48AM +0100, Vasileios Amoiridis wrote: > @@ -73,6 +77,19 @@ allOf: > then: > properties: > interrupts: false > + - if: > + properties: > + compatible: > + not: > + contains: > + enum: You have just two variants in this "not-containts", so invert your clause. Easier code. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On Fri, Nov 29, 2024 at 08:22:00AM +0100, Krzysztof Kozlowski wrote: > On Fri, Nov 29, 2024 at 12:24:48AM +0100, Vasileios Amoiridis wrote: > > @@ -73,6 +77,19 @@ allOf: > > then: > > properties: > > interrupts: false > > + - if: > > + properties: > > + compatible: > > + not: > > + contains: > > + enum: > > You have just two variants in this "not-containts", so invert your > clause. Easier code. > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > Best regards, > Krzysztof > Hi Krzysztof, Thank you very much for the review! I will fix it in the next version. Cheers, Vasilis
diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml index cb201cecfa1a..cbddc7bb26a6 100644 --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml @@ -55,12 +55,16 @@ properties: If not set, defaults to push-pull configuration. type: boolean + spi-max-frequency: + maximum: 10000000 + required: - compatible - vddd-supply - vdda-supply allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# - if: properties: compatible: @@ -73,6 +77,19 @@ allOf: then: properties: interrupts: false + - if: + properties: + compatible: + not: + contains: + enum: + - bosch,bmp280 + - bosch,bme280 + - bosch,bmp380 + - bosch,bmp580 + then: + properties: + spi-max-frequency: false additionalProperties: false @@ -93,3 +110,21 @@ examples: vdda-supply = <&bar>; }; }; + - | + # include <dt-bindings/gpio/gpio.h> + # include <dt-bindings/interrupt-controller/irq.h> + spi { + #address-cells = <1>; + #size-cells = <0>; + pressure@0 { + compatible = "bosch,bmp280"; + reg = <0>; + spi-max-frequency = <10000000>; + interrupt-parent = <&gpio0>; + interrupts = <25 IRQ_TYPE_EDGE_RISING>; + reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + vddd-supply = <&foo>; + vdda-supply = <&bar>; + }; + }; +
The BMP{2,3,5}80 and BME280 devices have an SPI interface, so include it in the device-tree. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> --- .../bindings/iio/pressure/bmp085.yaml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)