mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Alexandre Bailon <abailon@baylibre.com>,
	rafael@kernel.org, rui.zhang@intel.com, amitk@kernel.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	ben.tseng@mediatek.com, khilman@baylibre.com, mka@chromium.org
Subject: Re: [PATCH 1/2] dt-bindings: thermal: Update the bindings to support multiple sensors
Date: Thu, 24 Feb 2022 11:00:13 +0100	[thread overview]
Message-ID: <e6d9f7ec-50db-75a4-03df-0d624d184ca3@linaro.org> (raw)
In-Reply-To: <20220218084604.1669091-2-abailon@baylibre.com>


Hi Alexandre,

thanks for your series

On 18/02/2022 09:46, Alexandre Bailon wrote:
> This adds two optionals properties and update the thermal-sensors
> property description to support multiple sensors with a thermal zone.


I think it would make sense to first send a patch fixing the missing 
attribute from txt -> yaml translation with the Fixes tag which was:

"A list of thermal sensor phandles and sensor specifier
   Type: list of		used while monitoring the thermal zone"

And add in the description if there are more than one sensor, then the 
max value will be returned. Then provide the code to get the max value.

The second series of changes would be the other aggregations and the 
implementation.


> ---
>   .../bindings/thermal/thermal-zones.yaml       | 30 +++++++++++++++++--
>   1 file changed, 27 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> index 2d34f3ccb2572..9f944c2364589 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> +++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> @@ -77,10 +77,24 @@ patternProperties:
>   
>         thermal-sensors:
>           $ref: /schemas/types.yaml#/definitions/phandle-array
> -        maxItems: 1
>           description:
> -          The thermal sensor phandle and sensor specifier used to monitor this
> -          thermal zone.
> +          An array of thermal sensor phandle and sensor specifier used to
> +          monitor this thermal zone.
> +          If the array contains more than one sensor then the returned value
> +          is the maximum unless aggregation-min or aggregation-avg properties
> +          are set.
> +
> +      aggregation-min:
> +        type: boolean
> +        description:
> +          Return the minimum temperature when the thermal monitor multiple
> +          sensors.
> +
> +      aggregation-avg:
> +        type: boolean
> +        description:
> +          Return the average temperature when the thermal monitor multiple
> +          sensors.

Maybe 'aggregation' could be a string?

	aggregation = "max";
	aggregation = "min";
	aggregation = "avg";

It should be in the optional section and probably a conditional if 
thermal-sensors has more than one item

>         coefficients:
>           $ref: /schemas/types.yaml#/definitions/uint32-array
> @@ -338,5 +352,15 @@ examples:
>                               };
>                       };
>               };
> +
> +            /* ... */
> +
> +            soc-max-thermal {
> +                    polling-delay-passive = <250>;
> +                    polling-delay = <1000>;
> +                    thermal-sensors = <&tsens0 5>, <&tsens0 11>;
> +                    trips {};
> +                    cooling-maps {};
> +            };
>       };
>   ...


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2022-02-24 10:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18  8:46 [PATCH 0/2] thermal: Add support of " Alexandre Bailon
2022-02-18  8:46 ` [PATCH 1/2] dt-bindings: thermal: Update the bindings to support " Alexandre Bailon
2022-02-24 10:00   ` Daniel Lezcano [this message]
2022-02-18  8:46 ` [PATCH 2/2] Thermal: Add support of " Alexandre Bailon
2022-02-25 23:52 ` [PATCH 0/2] thermal: " Eduardo Valentin
2022-03-23 21:33   ` Kevin Hilman
2022-04-05 12:14     ` AngeloGioacchino Del Regno
2022-04-05 16:23       ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6d9f7ec-50db-75a4-03df-0d624d184ca3@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=abailon@baylibre.com \
    --cc=amitk@kernel.org \
    --cc=ben.tseng@mediatek.com \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®