Skip to content

Commit

Permalink
iio:pressure: initial zpa2326 barometer support
Browse files Browse the repository at this point in the history
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 <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Gregor Boirie authored and Jonathan Cameron committed Sep 18, 2016
1 parent 063e330 commit 03b262f
Show file tree
Hide file tree
Showing 7 changed files with 2,082 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Documentation/devicetree/bindings/iio/pressure/zpa2326.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Murata ZPA2326 pressure sensor

Pressure sensor from Murata with SPI and I2C bus interfaces.

Required properties:
- compatible: "murata,zpa2326"
- reg: the I2C address or SPI chip select the device will respond to

Recommended properties for SPI bus usage:
- spi-max-frequency: maximum SPI bus frequency as documented in
Documentation/devicetree/bindings/spi/spi-bus.txt

Optional properties:
- vref-supply: an optional regulator that needs to be on to provide VREF
power to the sensor
- vdd-supply: an optional regulator that needs to be on to provide VDD
power to the sensor
- interrupt-parent: phandle to the parent interrupt controller as documented in
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- interrupts: interrupt mapping for IRQ as documented in
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

Example:

zpa2326@5c {
compatible = "murata,zpa2326";
reg = <0x5c>;
interrupt-parent = <&gpio>;
interrupts = <12>;
vdd-supply = <&ldo_1v8_gnss>;
};
22 changes: 22 additions & 0 deletions drivers/iio/pressure/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,26 @@ config HP206C
This driver can also be built as a module. If so, the module will
be called hp206c.

config ZPA2326
tristate "Murata ZPA2326 pressure sensor driver"
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
select REGMAP
select ZPA2326_I2C if I2C
select ZPA2326_SPI if SPI_MASTER
help
Say Y here to build support for the Murata ZPA2326 pressure and
temperature sensor.

To compile this driver as a module, choose M here: the module will
be called zpa2326.

config ZPA2326_I2C
tristate
select REGMAP_I2C

config ZPA2326_SPI
tristate
select REGMAP_SPI

endmenu
3 changes: 3 additions & 0 deletions drivers/iio/pressure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ st_pressure-y := st_pressure_core.o
st_pressure-$(CONFIG_IIO_BUFFER) += st_pressure_buffer.o
obj-$(CONFIG_T5403) += t5403.o
obj-$(CONFIG_HP206C) += hp206c.o
obj-$(CONFIG_ZPA2326) += zpa2326.o
obj-$(CONFIG_ZPA2326_I2C) += zpa2326_i2c.o
obj-$(CONFIG_ZPA2326_SPI) += zpa2326_spi.o

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

0 comments on commit 03b262f

Please sign in to comment.