linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Wei Wang <wvw@google.com>, Wei Wang <wei.vince.wang@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Amit Kucheria <amit.kucheria@verdurent.com>,
	Linux PM list <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH v3 0/3] thermal: introduce by-name softlink
Date: Wed, 11 Dec 2019 09:53:24 +0100	[thread overview]
Message-ID: <20191211085324.GA500800@kroah.com> (raw)
In-Reply-To: <0603228e-5f0b-d335-30ce-67cf0626a489@linaro.org>

On Tue, Dec 10, 2019 at 09:54:11PM +0100, Daniel Lezcano wrote:
> On 10/12/2019 21:01, Wei Wang wrote:
> > On Tue, Dec 10, 2019 at 6:36 AM Daniel Lezcano
> > <daniel.lezcano@linaro.org> wrote:
> >>
> >> On 05/12/2019 08:19, Wei Wang wrote:
> >>> The paths thermal_zone%d and cooling_device%d are not intuitive and the
> >>> numbers are subject to change due to device tree change. This usually
> >>> leads to tree traversal in userspace code.
> >>> The patch creates `tz-by-name' and `cdev-by-name' for thermal zone and
> >>> cooling_device respectively.
> >>
> >> Instead of adding another ABI, I suggest we put the current one
> >> deprecated with a warning in the dmesg, update the documentation and
> >> change the name the next version.
> >>
> >>
> > 
> > IMHO, we should keep the existing path which is a common pattern for
> > sysfs interface. There are reasons we need couple thermal zone and
> > cooling device in one class, but might be worth considering split as
> > the latter might be used for other purposes e.g. battery current limit
> > for preventive vdrop prevention. By nature, thermal zone are sensors,
> > and cooling devices are usually components with potential high power
> > use.
> 
> [Added Greghk and Rafael in Cc]
> 
> I understand but I would like to have Greg's and Rafael's opinion on that.
> 
> The result is:
> 
> ls -al /sys/devices/virtual/thermal/
> total 0
> drwxr-xr-x 22 root root 0 Dec 10 12:34 .
> drwxr-xr-x 15 root root 0 Dec 10 12:34 ..
> drwxr-xr-x  2 root root 0 Dec 10 13:18 cdev-by-name

Ick!

> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device0
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device1
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device10
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device11
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device12
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device13
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device14
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device15
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device2
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device3
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device4
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device5
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device6
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device7
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device8
> drwxr-xr-x  3 root root 0 Dec 10 12:34 cooling_device9
> drwxr-xr-x  3 root root 0 Dec 10 12:34 thermal_zone0
> drwxr-xr-x  3 root root 0 Dec 10 12:34 thermal_zone1
> drwxr-xr-x  2 root root 0 Dec 10 13:18 tz-by-name
> 
> ls -al /sys/devices/virtual/thermal/cdev-by-name/
> total 0
> drwxr-xr-x  2 root root 0 Dec 10 13:18 .
> drwxr-xr-x 22 root root 0 Dec 10 12:34 ..
> lrwxrwxrwx  1 root root 0 Dec 10 13:18 thermal-cpufreq-0 ->
> ../cooling_device0

Ick ick ick!

What is this all for?

Where is the Documentation/ABI/ entry trying to explain this mess?
Please provide that and we can go from there as I have no idea what this
is trying to "help with".

thanks,

greg k-h

  reply	other threads:[~2019-12-11  8:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05  7:19 [PATCH v3 0/3] thermal: introduce by-name softlink Wei Wang
2019-12-05  7:19 ` [PATCH v3 1/3] thermal: prevent cooling device with no type to be registered Wei Wang
2019-12-09  7:41   ` Amit Kucheria
2019-12-09 17:34     ` Wei Wang
2019-12-09 19:36   ` Daniel Lezcano
2019-12-09 21:13     ` Wei Wang
2019-12-05  7:19 ` [PATCH v3 2/3] thermal: improve error message in thermal zone registration Wei Wang
2019-12-09  7:41   ` Amit Kucheria
2019-12-05  7:19 ` [PATCH v3 3/3] thermal: create softlink by name for thermal_zone and cooling_device Wei Wang
2019-12-06 19:15   ` Matthias Kaehlcke
2019-12-09  7:42   ` Amit Kucheria
2019-12-10 14:36 ` [PATCH v3 0/3] thermal: introduce by-name softlink Daniel Lezcano
2019-12-10 20:01   ` Wei Wang
2019-12-10 20:54     ` Daniel Lezcano
2019-12-11  8:53       ` Greg Kroah-Hartman [this message]
2019-12-11  8:54       ` Greg Kroah-Hartman
2019-12-11 20:11         ` Wei Wang
2019-12-11 21:11           ` Daniel Lezcano
2019-12-11 22:19             ` Wei Wang
2019-12-15 16:34               ` Sandeep Patil
2019-12-16 17:37                 ` Wei Wang
2019-12-12  7:34           ` Greg Kroah-Hartman

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=20191211085324.GA500800@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=amit.kucheria@verdurent.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=wei.vince.wang@gmail.com \
    --cc=wvw@google.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;
as well as URLs for NNTP newsgroup(s).