iio: pressure: bmp280: Minor cleanup
Subsystems (2)
v3 cover iio: pressure: bmp280: Minor cleanup
Changes in v3:
- Remove interrupts from SPI example
---
v2: https://lore.kernel.org/linux-iio/[email protected]/
Changes in v2:
Patch 1/3:
- Switch if case for better readability
Patch 2/3:
- Reword commit message
---
v1: https://lore.kernel.org/linux-iio/[email protected]/
This series adds the SPI interface description on the device-tree file of the sensor, adds proper self-described sized variables and performs a minor optimization in time variable names.
Vasileios Amoiridis (1):
dt-bindings: iio: pressure: bmp085: Add SPI interface
.../bindings/iio/pressure/bmp085.yaml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)
base-commit: 5ab39233382c621d3271cc274d1534e1b687f4d3
Signature · 1 line
2.43.0
PATCH v3 1/1 dt-bindings: iio: pressure: bmp085: Add SPI interface
The BMP{2,3,5}80 and BME280 devices have an SPI interface, so include it in the device-tree.
--- .../bindings/iio/pressure/bmp085.yaml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)
Documentation/devicetree/bindings/iio/pressure/bmp085.yaml +30 -0
@@ -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,16 @@ allOf: then: properties: interrupts: false + - if: + properties: + compatible: + contains: + enum: + - bosch,bmp085 + - bosch,bmp180 + then: + properties: + spi-max-frequency: false additionalProperties: false
@@ -93,3 +107,19 @@ 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>; + reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + vddd-supply = <&foo>; + vdda-supply = <&bar>; + }; + }; +
Signature · 1 line
2.43.0
Jonathan Cameron
maintainerRe: [PATCH v3 1/1] dt-bindings: iio: pressure: bmp085: Add SPI interface
Quoted 5 lines · On Tue, 10 Dec 2024 00:38:45 +0100 Vasileios Amoiridis…
The BMP{2,3,5}80 and BME280 devices have an SPI interface, so include it in the device-tree.
Reviewed-by Krzysztof Kozlowski <[email protected]>Signed-off-by Vasileios Amoiridis <[email protected]>
Stray blank line at end of file. I fixed that up and applied,
Thanks,
Jonathan
Quoted 62 lines
--- .../bindings/iio/pressure/bmp085.yaml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)Documentation/devicetree/bindings/iio/pressure/bmp085.yaml +30
-0@@ -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,16 @@ allOf: then: properties: interrupts: false + - if: + properties: + compatible: + contains: + enum: + - bosch,bmp085 + - bosch,bmp180 + then: + properties: + spi-max-frequency: false additionalProperties: false@@ -93,3 +107,19 @@ 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>; + reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + vddd-supply = <&foo>; + vdda-supply = <&bar>; + }; + }; +