From: Guenter Roeck <guenter.roeck@ericsson.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Voltage/current/sensor monitoring interface and Wiegand
Date: Fri, 10 Sep 2010 20:47:13 +0000 (UTC) [thread overview]
Message-ID: <loom.20100910T224602-978@post.gmane.org> (raw)
In-Reply-To: <20100909050137.GR14056@atomos.longlandclan.yi.org>
Stuart Longland <redhatter <at> gentoo.org> writes:
>
> On Thu, Sep 09, 2010 at 02:48:26PM +1200, Ryan Mallon wrote:
> > On 09/09/2010 12:02 PM, Stuart Longland wrote:
> > > How are voltage *monitors* normally written? (note, not voltage
> > > *regulators*... this thing does not alter the voltage rails.) I tried
> > > to make sense of lm-sensors, but that seems very ad-hoc (maybe I missed
> > > some document that explains it) to me. It's hard to be clear on what is
> > > the *right* way to report a voltage or current reading to userspace.
> >
> > Depending on your particular application it might make sense to use the
> > power supply class (see Documentation/power/power_supply_class.txt) for
> > the voltage/current monitoring. If the temperature sensor is related to
> > a power supply monitor, then it could also go there.
>
> Ahh okay, I'll have a look there.. The temperature isn't related to the
> power supply, so I might continue a searchfor its rightful place, but
> that class of devices seems like a good fit.
For voltage, current, and temperature monitoring, you should really look into
using using hwmon. The power supply class doesn't make sense to me, unless you
are actually monitoring a power supply and not a voltage. For multi-function
devices, you might also want to look into mfd for higher level access control.
If you have problems understanding what needs to be done, feel free to get in
touch. If the sysfs ABI is insufficient for your needs, just drop an e-mail to
the lm-sensors mailing list. Easier to extend an existing ABI than to write a
new one.
Guenter
next prev parent reply other threads:[~2010-09-10 20:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-09 0:02 Stuart Longland
2010-09-09 2:48 ` Ryan Mallon
2010-09-09 5:01 ` Stuart Longland
2010-09-09 8:29 ` Mark Brown
2010-09-10 20:47 ` Guenter Roeck [this message]
2010-09-09 12:43 ` Jonathan Cameron
2010-09-09 22:46 ` Stuart Longland
2010-09-10 6:32 ` Dmitry Torokhov
2010-09-13 1:13 ` Stuart Longland
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=loom.20100910T224602-978@post.gmane.org \
--to=guenter.roeck@ericsson.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome