linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Ni <wni@nvidia.com>
To: <rui.zhang@intel.com>, <len.brown@intel.com>,
	<akpm@linux-foundation.org>, <khali@linux-fr.org>,
	<joe@perches.com>, <durgadoss.r@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-tegra@ger.kernel.org>,
	<acourbot@nvidia.com>
Subject: How to use the generic thermal sysfs.
Date: Thu, 12 Jul 2012 18:22:53 +0800	[thread overview]
Message-ID: <1342088573.27605.101.camel@tegra-chromium-2> (raw)

Hi, all
I'm working on the tegra thermal throttling upstream issue.
The tegra30 board use the nct1008 as the thermal sensor, and the lm90 is
the sensor driver. We want to use the generic thermal sysfs.
 
My question is where should we register the thermal zone device? We may
have two place to do it:
1. register it in the sensor driver, such as lm90.c
In this way, the sensor driver doesn't need to export any APIs, such as
get_temp.
2. register in my tegra thermal framework.
In this way, the sensor driver need to export some APIs, which are used
to register the ops and do any other things.

How should I do it?

And in current codes, there have the event notification, in the form of
a netlink event. But it's difficult to be used in the kernel, it's
normally for the communication with user-space. How about to add a
notify call chain for it? So when the sensor has irq alert, it can send
a notify to my thermal framework in kernel.

Do anyone has suggestions?

Thanks.
Wei.

---
nvpublic


             reply	other threads:[~2012-07-12 10:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 10:22 Wei Ni [this message]
2012-07-12 10:54 ` How to use the generic thermal sysfs R, Durgadoss
2012-07-13  1:51   ` Zhang Rui
2012-07-13  7:30     ` Wei Ni
2012-07-13  7:41       ` Zhang Rui
2012-07-13  8:11         ` Wei Ni
2012-07-13  9:53           ` Wei Ni
2012-07-26  9:31         ` Wei Ni
2012-07-27  1:21           ` Zhang Rui
2012-07-27  2:58             ` Wei Ni
2012-07-27  7:30               ` Jean Delvare
2012-07-27  7:39                 ` Zhang Rui
2012-07-27 10:48                   ` Wei Ni
2012-08-01  1:02                     ` Zhang Rui
2012-08-01 11:29                       ` Wei Ni
2012-10-17  7:15         ` How can I get the latest generic thermal framework Wei Ni
2012-10-17  8:36           ` R, Durgadoss
2012-07-13  5:48   ` How to use the generic thermal sysfs Alex Courbot
2012-07-13  5:54     ` R, Durgadoss
2012-07-13  6:08       ` Alex Courbot
2012-07-13  6:10         ` 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=1342088573.27605.101.camel@tegra-chromium-2 \
    --to=wni@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=durgadoss.r@intel.com \
    --cc=joe@perches.com \
    --cc=khali@linux-fr.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@ger.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;
as well as URLs for NNTP newsgroup(s).