Skip to content

Commit

Permalink
devicetree: add lm90 thermal_zone sensor support
Browse files Browse the repository at this point in the history
This patch updates the LM90's devicetree definition to
include the #thermal-sensor-cells property as well as
the sensor constants in include/dt-bindings/thermal/lm90.h.

Cc: Wei Ni <wni@nvidia.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
chunkeey authored and groeck committed Feb 11, 2017
1 parent e531ffc commit 87d08b1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/hwmon/lm90.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Optional properties:
LM90 "-ALERT" pin output.
See interrupt-controller/interrupts.txt for the format.

- #thermal-sensor-cells: should be set to 1. See thermal/thermal.txt for
details. See <include/dt-bindings/thermal/lm90.h> for the
definition of the local, remote and 2nd remote sensor index
constants.

Example LM90 node:

temp-sensor {
Expand All @@ -41,4 +46,5 @@ temp-sensor {
vcc-supply = <&palmas_ldo6_reg>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
#thermal-sensor-cells = <1>;
}
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7527,6 +7527,7 @@ S: Maintained
F: Documentation/hwmon/lm90
F: Documentation/devicetree/bindings/hwmon/lm90.txt
F: drivers/hwmon/lm90.c
F: include/dt-bindings/thermal/lm90.h

LM95234 HARDWARE MONITOR DRIVER
M: Guenter Roeck <linux@roeck-us.net>
Expand Down
12 changes: 12 additions & 0 deletions include/dt-bindings/thermal/lm90.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* This header provides constants for the LM90 thermal bindings.
*/

#ifndef _DT_BINDINGS_THERMAL_LM90_H_
#define _DT_BINDINGS_THERMAL_LM90_H_

#define LM90_LOCAL_TEMPERATURE 0
#define LM90_REMOTE_TEMPERATURE 1
#define LM90_REMOTE2_TEMPERATURE 2

#endif

0 comments on commit 87d08b1

Please sign in to comment.