[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHLCerMvwfBEGO6O9kHMg14AfJ1bEO7ZP4i=SH3XO6HCKucVKQ@mail.gmail.com>
Date: Wed, 1 Apr 2020 19:08:13 +0530
From: Amit Kucheria <amit.kucheria@...durent.com>
To: Lukasz Luba <lukasz.luba@....com>
Cc: LKML <linux-kernel@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Stephen Boyd <swboyd@...omium.org>,
Matthias Kaehlcke <mka@...omium.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Zhang Rui <rui.zhang@...el.com>, Rob Herring <robh@...nel.org>,
Linux PM list <linux-pm@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH v4 1/3] dt-bindings: thermal: Add yaml bindings for
thermal sensors
On Wed, Apr 1, 2020 at 6:10 PM Lukasz Luba <lukasz.luba@....com> wrote:
>
>
>
> On 4/1/20 12:15 PM, Amit Kucheria wrote:
> > As part of moving the thermal bindings to YAML, split it up into 3
> > bindings: thermal sensors, cooling devices and thermal zones.
> >
> > The property #thermal-sensor-cells is required in each device that acts
> > as a thermal sensor. It is used to uniquely identify the instance of the
> > thermal sensor inside the system.
> >
> > Signed-off-by: Amit Kucheria <amit.kucheria@...aro.org>
> > Reviewed-by: Rob Herring <robh@...nel.org>
> > ---
> > .../bindings/thermal/thermal-sensor.yaml | 72 +++++++++++++++++++
> > 1 file changed, 72 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/thermal/thermal-sensor.yaml b/Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
> > new file mode 100644
> > index 0000000000000..920ee7667591d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
> > @@ -0,0 +1,72 @@
> > +# SPDX-License-Identifier: (GPL-2.0)
> > +# Copyright 2020 Linaro Ltd.
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/thermal/thermal-sensor.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Thermal sensor binding
> > +
> > +maintainers:
> > + - Amit Kucheria <amitk@...nel.org>
> > +
> > +description: |
> > + Thermal management is achieved in devicetree by describing the sensor hardware
> > + and the software abstraction of thermal zones required to take appropriate
> > + action to mitigate thermal overloads.
> > +
> > + The following node types are used to completely describe a thermal management
> > + system in devicetree:
> > + - thermal-sensor: device that measures temperature, has SoC-specific bindings
> > + - cooling-device: device used to dissipate heat either passively or artively
>
> s/artively/actively
>
> > + - thermal-zones: a container of the following node types used to describe all
> > + thermal data for the platform
> > +
> > + This binding describes the thermal-sensor.
> > +
> > + Thermal sensor devices provide temperature sensing capabilities on thermal
> > + zones. Typical devices are I2C ADC converters and bandgaps. Thermal sensor
> > + devices may control one or more internal sensors.
> > +
> > +properties:
> > + "#thermal-sensor-cells":
> > + description:
> > + Used to uniquely identify a thermal sensor instance within an IC. Will be
> > + 0 on sensor nodes with only a single sensor and at least 1 on nodes
> > + containing several internal sensors.
> > + enum: [0, 1]
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > + // Example 1: SDM845 TSENS
> > + soc: soc@0 {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > +
> > + /* ... */
> > +
> > + tsens0: thermal-sensor@...3000 {
> > + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
> > + reg = <0 0x0c263000 0 0x1ff>, /* TM */
> > + <0 0x0c222000 0 0x1ff>; /* SROT */
> > + #qcom,sensors = <13>;
> > + interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "uplow", "critical";
> > + #thermal-sensor-cells = <1>;
> > + };
> > +
> > + tsens1: thermal-sensor@...5000 {
> > + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
> > + reg = <0 0x0c265000 0 0x1ff>, /* TM */
> > + <0 0x0c223000 0 0x1ff>; /* SROT */
> > + #qcom,sensors = <8>;
> > + interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "uplow", "critical";
> > + #thermal-sensor-cells = <1>;
> > + };
> > + };
> > +...
> >
>
> Apart from the above, looks good.
>
> Reviewed-by: Lukasz Luba <lukasz.luba@....com>
Thanks for the review. Will spin a v5 with those trivial fixes.
Powered by blists - more mailing lists