[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191211085324.GA500800@kroah.com>
Date: Wed, 11 Dec 2019 09:53:24 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Wei Wang <wvw@...gle.com>, Wei Wang <wei.vince.wang@...il.com>,
Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
Amit Kucheria <amit.kucheria@...durent.com>,
Linux PM list <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>
Subject: Re: [PATCH v3 0/3] thermal: introduce by-name softlink
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@...aro.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
Powered by blists - more mailing lists