Skip to content

Commit 03b262f

Browse files
grgbrjic23
authored andcommitted
iio:pressure: initial zpa2326 barometer support
Introduce driver for Murata ZPA2326 pressure and temperature sensor: http://www.murata.com/en-us/products/productdetail?partno=ZPA2326-0311A-R Signed-off-by: Gregor Boirie <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 063e330 commit 03b262f

File tree

7 files changed

+2082
-0
lines changed

7 files changed

+2082
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Murata ZPA2326 pressure sensor
2+
3+
Pressure sensor from Murata with SPI and I2C bus interfaces.
4+
5+
Required properties:
6+
- compatible: "murata,zpa2326"
7+
- reg: the I2C address or SPI chip select the device will respond to
8+
9+
Recommended properties for SPI bus usage:
10+
- spi-max-frequency: maximum SPI bus frequency as documented in
11+
Documentation/devicetree/bindings/spi/spi-bus.txt
12+
13+
Optional properties:
14+
- vref-supply: an optional regulator that needs to be on to provide VREF
15+
power to the sensor
16+
- vdd-supply: an optional regulator that needs to be on to provide VDD
17+
power to the sensor
18+
- interrupt-parent: phandle to the parent interrupt controller as documented in
19+
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
20+
- interrupts: interrupt mapping for IRQ as documented in
21+
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
22+
23+
Example:
24+
25+
zpa2326@5c {
26+
compatible = "murata,zpa2326";
27+
reg = <0x5c>;
28+
interrupt-parent = <&gpio>;
29+
interrupts = <12>;
30+
vdd-supply = <&ldo_1v8_gnss>;
31+
};

drivers/iio/pressure/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,26 @@ config HP206C
187187
This driver can also be built as a module. If so, the module will
188188
be called hp206c.
189189

190+
config ZPA2326
191+
tristate "Murata ZPA2326 pressure sensor driver"
192+
select IIO_BUFFER
193+
select IIO_TRIGGERED_BUFFER
194+
select REGMAP
195+
select ZPA2326_I2C if I2C
196+
select ZPA2326_SPI if SPI_MASTER
197+
help
198+
Say Y here to build support for the Murata ZPA2326 pressure and
199+
temperature sensor.
200+
201+
To compile this driver as a module, choose M here: the module will
202+
be called zpa2326.
203+
204+
config ZPA2326_I2C
205+
tristate
206+
select REGMAP_I2C
207+
208+
config ZPA2326_SPI
209+
tristate
210+
select REGMAP_SPI
211+
190212
endmenu

drivers/iio/pressure/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ st_pressure-y := st_pressure_core.o
2222
st_pressure-$(CONFIG_IIO_BUFFER) += st_pressure_buffer.o
2323
obj-$(CONFIG_T5403) += t5403.o
2424
obj-$(CONFIG_HP206C) += hp206c.o
25+
obj-$(CONFIG_ZPA2326) += zpa2326.o
26+
obj-$(CONFIG_ZPA2326_I2C) += zpa2326_i2c.o
27+
obj-$(CONFIG_ZPA2326_SPI) += zpa2326_spi.o
2528

2629
obj-$(CONFIG_IIO_ST_PRESS_I2C) += st_pressure_i2c.o
2730
obj-$(CONFIG_IIO_ST_PRESS_SPI) += st_pressure_spi.o

0 commit comments

Comments
 (0)