devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Eduardo Valentin
	<edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Vincent Guittot
	<vincent.guittot-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Punit.Agrawal-5wv7dgnIgG8@public.gmane.org,
	ionela.voinescu-5wv7dgnIgG8@public.gmane.org
Subject: Re: [Query] thermal: Who is using "cooling-{min|max}-level}" properties ?
Date: Fri, 9 Feb 2018 14:54:21 +0530	[thread overview]
Message-ID: <20180209092421.GL28462@vireshk-i7> (raw)
In-Reply-To: <539699c7-9509-dea2-2b31-c5f6749c99c4-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On 09-02-18, 10:15, Daniel Lezcano wrote:
> On 09/02/2018 07:42, Viresh Kumar wrote:
> > On 07-02-18, 11:45, Daniel Lezcano wrote:
> >> Yes, that is my understanding. cooling-min-level and cooling-max-level
> >> are not used in the thermal framework code today.
> > 
> > Right.
> > 
> >> So if they are defined, we should check the cooling-device max and min
> >> are in the boundaries (if they are different from no-limit).
> > 
> > Hmm, I am not sure. We do compare those values (from maps) with the
> > max reported by the cooling driver, so there is some boundary check
> > happening. And I don't think it is worth comparing the min/max values
> > from DT cooling device's nodes. Why not just leave those for the
> > driver to return (which is already happening btw).
> > 
> > I don't think it would be correct for the thermal core to go and look
> > at the min/max properties of the cooling device directly, as those are
> > more for the thermal driver's help. The thermal core should just call
> > the get_max_state() callback and that's it.
> > 
> > Anyway, we can take decision on the binding itself after some time but
> > I will send some patches to get rid of this property from CPU nodes
> > for now. It doesn't make sense to have it there (anyway it is
> > optional), as the cpu cooling devices are kind of virtual cooling
> > devices which rely on OPP or freq-table currently. Maybe I will begin
> > by just updating one platform and once that is merged, update
> > everything else as well.

So I eventually updated everything as very small number of platforms
were actually using it.

https://lkml.kernel.org/r/cover.1518166039.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org

> What about the "cooling-cells" ? Its usage is unclear in the code and
> I'm not sure it is really needed.

As I can see, it is actually used (sometimes a bit indirectly).

- This field is used to check if a device is a cooling device or not.
  For example, the cpu-cooling device wouldn't be registered by the
  cpufreq drivers unless this property is present in the CPU node. So
  this is actually used.

- This field (and its value) also comes into picture while parsing the
  "cooling-maps". The "cooling-device" property in the map needs to
  have "cooing-cells" + 1 fields. The first one is the cooling-device
  phandle, followed by min/max states.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-02-09  9:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07  6:59 [Query] thermal: Who is using "cooling-{min|max}-level}" properties ? Viresh Kumar
2018-02-07 10:04 ` Daniel Lezcano
     [not found]   ` <c7bd6ed5-b93e-3a07-b4a2-4c3b1eef5fac-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-02-07 10:24     ` Viresh Kumar
2018-02-07 10:45       ` Daniel Lezcano
2018-02-09  6:42         ` Viresh Kumar
2018-02-09  9:15           ` Daniel Lezcano
     [not found]             ` <539699c7-9509-dea2-2b31-c5f6749c99c4-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-02-09  9:24               ` Viresh Kumar [this message]
2018-02-09 12:14                 ` Daniel Lezcano
     [not found]                   ` <5722441d-c8be-4d29-fab7-28b4e5716961-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-02-12  6:10                     ` Viresh Kumar
2018-02-12  8:39                       ` Daniel Lezcano
2018-02-12  8:52                         ` Viresh Kumar
2018-02-12  9:52                           ` Daniel Lezcano
2018-02-12 10:17                             ` Viresh Kumar

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=20180209092421.GL28462@vireshk-i7 \
    --to=viresh.kumar-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=Punit.Agrawal-5wv7dgnIgG8@public.gmane.org \
    --cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ionela.voinescu-5wv7dgnIgG8@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=vincent.guittot-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).