hwmon: (sht15) Add device tree support
Subsystems (2)
PATCH v3 2/2 hwmon: (sht15) Add device tree support
Allow the driver to work with device tree support.
Based on initial patch submission from Peter Fox.
Tested on a imx7d-sdb board connected to a SHT15 board via Mikro Bus.
---
Changes since v2:
- Propagate the real error code when of_get_named_gpio() fails
- Do not print error on EPROBE_DEFER case
- Changed the sht15_probe_dt function comments to be compatible with the returns values
Documentation/devicetree/bindings/hwmon/sht15.txt | 25 +++++++++ drivers/hwmon/sht15.c | 68 +++++++++++++++++++++-- 2 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/hwmon/sht15.txt
Documentation/devicetree/bindings/hwmon/sht15.txt new file +25 -0
@@ -0,0 +1,25 @@ +Sensirion SHT15 Humidity and Temperature Sensor + +Required properties: + + - "compatible": must be "sensirion,sht15". + - "data-gpios": GPIO connected to the data line. + - "clk-gpios": GPIO connected to the clock line. + - "vcc-supply": regulator that drives the VCC pin. + +Optional properties: + + - "checksum": boolean property that when present enables the CRC validation of the readings. + - "no-otp-reload": boolean property that when present indicates not to reload from OTP. + - "low-resolution": boolean property that when present indicates that the device operates in + low-resolution mode. +Example: + + temp_humid_sensor: sht15 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sensor>; + compatible = "sensirion,sht15"; + clk-gpios = <&gpio4 12 0>; + data-gpios = <&gpio4 13 0>; + vcc-supply = <®_sht15>; + };
drivers/hwmon/sht15.c +64 -4
93 lines not on this page · raw message
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): 1487162701-12097-1-git-send-email-marco.franchi-3arQi8VN3Tc@public.gmane.org
PATCH v3 1/2 dt: Add vendor prefix for Sensirion
Sensirion is a sensor manufacturer, providing relative humidity sensors, temperature sensor and flow sensor solutions.
---
Changes since v2:
- none
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -263,6 +263,7 @@ sbs Smart Battery System schindler Schindler seagate Seagate Technology PLC semtech Semtech Corporation +sensirion Sensirion AG sgx SGX Sensortech sharp Sharp Corporation si-en Si-En Technology Ltd.
Signature · 1 line
2.7.4