From: Thomas Renninger <trenn@suse.de>
To: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Jean Delvare <jdelvare@suse.de>,
"R, Durgadoss" <durgadoss.r@intel.com>,
"Zhang, Rui" <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"Yu, Fenghua" <fenghua.yu@intel.com>
Subject: Re: thermal: Avoid CONFIG_NET compile dependency
Date: Thu, 27 Jan 2011 10:48:28 +0100 [thread overview]
Message-ID: <201101271048.29091.trenn@suse.de> (raw)
In-Reply-To: <20110125162536.GD8024@ericsson.com>
On Tuesday, January 25, 2011 05:25:36 PM Guenter Roeck wrote:
> On Tue, Jan 25, 2011 at 11:18:36AM -0500, Thomas Renninger wrote:
> > On Tuesday, January 25, 2011 02:43:15 PM Guenter Roeck wrote:
> > > On Tue, Jan 25, 2011 at 04:48:43AM -0500, Jean Delvare wrote:
> > > > On Tuesday 25 January 2011 05:47:56 am R, Durgadoss wrote:
> > ...
> > > > I don't remember the details, but one thing for sure if that you can't
> > > > change the format of existing attributes the hwmon subsystem (and
> > > > libsensors) is using. These are standardized per
> > > > Documentation/hwmon/sysfs-interface, so they can't be changed. But there
> > > > is no problem with registering a second class device with the thermal
> > > > subsystem and adding whatever attributes you want to have there.
> > > >
> > > A secondary problem is that thermal subsystem drivers register themselves
> > > with the hwmon subsystem - at least if CONFIG_THERMAL_HWMON is defined.
> > > So it doesn't really make much sense for a driver to register itself
> > > as thermal driver _and_ as hwmon driver, since it may end up being listed
> > > twice as hwmon device.
> > Having a very quick look at coretemp, this one only provides thermal data,
> > right?
> > So it should register as a thermal driver which in turn tells userspace
> > that lsmsensors can retrieve data from it.
> > The data would then get exported via:
> > /sys/devices/virtual/thermal/
> > and the whole platform code can get removed.
> >
> That would be an option.
What would be the next steps then?
Whatabout:
1) Reverting the current thermal_netlink implementation
2) Make coretemp register as a thermal driver.
This can be done on top of Durgadoss' enhancements.
Revert the one thermal_netlink_event call
3) Come up with a more generic and more thermal bound
(do not export things to the whole kernel if possible)
thermal netlink implementation.
Important is a robust interface. No need to define all
possible events, they can be added one by one if thinkpad
or whatever users need them.
But the format should not need to be changed in the recent
future.
Might be worth to put this into an own file:
drivers/thermal/thermal_netlink.c
4) Ideally coretemp.c does not need a special hook to trigger
the event. If, it could be some kind of thermal driver
callback it got when registering as a thermal driver.
Like that the thermal netlink events are hidden and cannot be
mis-used by arbitrary drivers, but drivers must register
as a thermal driver to be able to trigger them.
Like that it can also be insured that the netlink event
always provides a pointer to a thermal device which can
be looked up via sysfs.
Not sure whether 4. will work out as described.
2. + 3. can be implemented in parallel and connected with
a tiny on top patch with 4 (if necessary at all).
If the current thermal_netlink_event implementation is not
reverted, there would be one kernel revision with a thermal
netlink userspace notification implementation which should
not get used. Hm and in the end userspace apps need to be
able to detect the never used one, it should really get
reverted.
Len?
Is there still someone who could veto above or a mailinglist
that should get added or can this be started without
much risk of getting a NAK afterwards?
Thanks,
Thomas
next prev parent reply other threads:[~2011-01-27 9:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 10:52 thermal: Avoid CONFIG_NET compile dependency R, Durgadoss
2011-01-21 12:12 ` Thomas Renninger
2011-01-24 1:22 ` Zhang Rui
2011-01-24 4:39 ` R, Durgadoss
2011-01-24 10:35 ` Thomas Renninger
2011-01-24 13:07 ` Thermal kernel events API to userspace - Was: " Thomas Renninger
2011-01-24 16:07 ` Henrique de Moraes Holschuh
2011-01-25 7:57 ` Zhang Rui
2011-01-25 10:12 ` Thomas Renninger
2011-01-25 16:10 ` Henrique de Moraes Holschuh
2011-01-26 7:14 ` Zhang, Rui
2011-01-26 21:28 ` Henrique de Moraes Holschuh
2011-01-25 15:51 ` Henrique de Moraes Holschuh
2011-01-25 4:47 ` R, Durgadoss
2011-01-25 9:20 ` Thomas Renninger
2011-01-25 9:45 ` R, Durgadoss
2011-01-25 9:48 ` Jean Delvare
2011-01-25 13:43 ` Guenter Roeck
2011-01-25 16:18 ` Thomas Renninger
2011-01-25 16:25 ` Guenter Roeck
2011-01-27 9:48 ` Thomas Renninger [this message]
2011-01-27 13:34 ` R, Durgadoss
2011-01-27 13:59 ` Thomas Renninger
2011-01-25 7:54 ` Zhang Rui
2011-01-25 8:43 ` R, Durgadoss
2011-01-24 0:34 ` Zhang Rui
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=201101271048.29091.trenn@suse.de \
--to=trenn@suse.de \
--cc=durgadoss.r@intel.com \
--cc=fenghua.yu@intel.com \
--cc=guenter.roeck@ericsson.com \
--cc=jdelvare@suse.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.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