Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: iio: pressure: Support Honeywell mprls0025pa sensor

Honeywell mprls0025pa is a pressure sensor series. There are many
different models with different pressure ranges, units and transfer
functions.

The range and transfer function need to be set up in the dt. Therefore
new properties honeywell,pmin-pascal, honeywell,pmax-pascal,
honeywell,transfer-function are introduced.

Add dt-bindings.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Link: https://lore.kernel.org/r/ZGNpve4ux5KJ3BNQ@arbad
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Andreas Klinger and committed by
Jonathan Cameron
a765c985 7cf15f42

+104
+104
Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/pressure/honeywell,mprls0025pa.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Honeywell mprls0025pa pressure sensor 8 + 9 + maintainers: 10 + - Andreas Klinger <ak@it-klinger.de> 11 + 12 + description: | 13 + Honeywell pressure sensor of model mprls0025pa. 14 + 15 + This sensor has an I2C and SPI interface. Only the I2C interface is 16 + implemented. 17 + 18 + There are many models with different pressure ranges available. The vendor 19 + calls them "mpr series". All of them have the identical programming model and 20 + differ in the pressure range, unit and transfer function. 21 + 22 + To support different models one need to specify the pressure range as well as 23 + the transfer function. Pressure range needs to be converted from its unit to 24 + pascal. 25 + 26 + The transfer function defines the ranges of numerical values delivered by the 27 + sensor. The minimal range value stands for the minimum pressure and the 28 + maximum value also for the maximum pressure with linear relation inside the 29 + range. 30 + 31 + Specifications about the devices can be found at: 32 + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/ 33 + products/sensors/pressure-sensors/board-mount-pressure-sensors/ 34 + micropressure-mpr-series/documents/ 35 + sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf 36 + 37 + properties: 38 + compatible: 39 + const: honeywell,mprls0025pa 40 + 41 + reg: 42 + maxItems: 1 43 + 44 + interrupts: 45 + maxItems: 1 46 + 47 + reset-gpios: 48 + description: 49 + Optional GPIO for resetting the device. 50 + If not present the device is not resetted during the probe. 51 + maxItems: 1 52 + 53 + honeywell,pmin-pascal: 54 + description: 55 + Minimum pressure value the sensor can measure in pascal. 56 + $ref: /schemas/types.yaml#/definitions/uint32 57 + 58 + honeywell,pmax-pascal: 59 + description: 60 + Maximum pressure value the sensor can measure in pascal. 61 + $ref: /schemas/types.yaml#/definitions/uint32 62 + 63 + honeywell,transfer-function: 64 + description: | 65 + Transfer function which defines the range of valid values delivered by the 66 + sensor. 67 + 1 - A, 10% to 90% of 2^24 (1677722 .. 15099494) 68 + 2 - B, 2.5% to 22.5% of 2^24 (419430 .. 3774874) 69 + 3 - C, 20% to 80% of 2^24 (3355443 .. 13421773) 70 + $ref: /schemas/types.yaml#/definitions/uint32 71 + 72 + vdd-supply: 73 + description: provide VDD power to the sensor. 74 + 75 + required: 76 + - compatible 77 + - reg 78 + - honeywell,pmin-pascal 79 + - honeywell,pmax-pascal 80 + - honeywell,transfer-function 81 + - vdd-supply 82 + 83 + additionalProperties: false 84 + 85 + examples: 86 + - | 87 + #include <dt-bindings/gpio/gpio.h> 88 + #include <dt-bindings/interrupt-controller/irq.h> 89 + i2c { 90 + #address-cells = <1>; 91 + #size-cells = <0>; 92 + 93 + pressure@18 { 94 + compatible = "honeywell,mprls0025pa"; 95 + reg = <0x18>; 96 + reset-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; 97 + interrupt-parent = <&gpio3>; 98 + interrupts = <21 IRQ_TYPE_EDGE_FALLING>; 99 + honeywell,pmin-pascal = <0>; 100 + honeywell,pmax-pascal = <172369>; 101 + honeywell,transfer-function = <1>; 102 + vdd-supply = <&vcc_3v3>; 103 + }; 104 + };