All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] powerX_alarm sysfs attribute
Date: Fri, 10 Dec 2010 15:12:09 +0000	[thread overview]
Message-ID: <20101210151209.GA11777@ericsson.com> (raw)
In-Reply-To: <20101209165858.GA521@ericsson.com>

On Fri, Dec 10, 2010 at 09:36:46AM -0500, Jean Delvare wrote:
> Hi Ira, Guenter,
> 
> On Thu, 9 Dec 2010 16:07:08 -0800, Ira W. Snyder wrote:
> > On Thu, Dec 09, 2010 at 01:48:33PM -0800, Guenter Roeck wrote:
> > > Question for the ltc4215 driver, though, is if power1_alarm is
> > > appropriate in the first place. After reading the datasheet, I noticed
> > > that it does not really report a power problem, but "output voltage
> > > low". So I wonder it the attribute in the driver should be "in2_alarm"
> > > or possibly "in2_min_alarm" instead of power1_alarm, and if the power
> > > attributes should be dropped entirely.
> > 
> > Reviewers (probably Jean) suggested the power1_input and power1_alarm
> > files when I submitted the driver. (I'm not placing blame, just
> > explaining where they came from.)
> 
> Probably not, the ltc4215 driver went upstream through Andrew Morton
> because I lacked the time to do a proper review.
> 
> > In both the ltc4215 and ltc4245 drivers, the power outputs are
> > calculated purely in software. This is very convenient for users of the
> > sensors utility.
> > 
> > I would like to keep the power1_input sysfs file.
> 
> I have no problem with this, at least as long as libsensors doesn't
> offer a way to bind current sensors to voltage sensors.
> 
> > I do not have any
> > objections to changing power1_alarm to in2_alarm or in2_min_alarm.
> 
> in2_* doesn't seem right for a voltage output alarm. I'd say such a
> feature doesn't belong to the hwmon ABI in the first place.
> 
Why not ? You lost me there. It optionally monitors the voltage it controls,
and provides the monitored value(s) to the user. Many of the other recent chips
do the same.  ltc4215, ltc4245, ltc4261, smm655, and pretty much all PMBus devices.
The ltc42xx devices act as voltage switch (on/off) and don't otherwise affect
the controlled voltage.
For ltc4215, in2_input is still connected to a a sensor input (AD2IN or so), as is
the FB pin (which causes the alarm if the voltage connected to it drops below a
certain level). It doesn't make sense to state that the monitored voltage can not
be reported through hwmon just because it may be a voltage it controls.

It gets even more tricky with devices which can be used as voltage controller
or voltage monitor or both. For example, the smm665 and ltc2978 are both a power
supply monitor and controller. I have seen them used for both purposes. But there isn't
a reason to deny hwmon support for such devices just because they also may be used for
voltage control.

Another question (for which I still don't have a clear answer) is if voltage controllers/monitors
such as the smm665 and at least some pmbus devices should also have a matching power_supply
component, and thus if they should be considered mfd devices with hwmon and power_supply
components. I have that on my backburner list; I'll probably get there if someone
actually wants to be able to set a voltage on one of the devices.

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2010-12-10 15:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 16:58 [lm-sensors] powerX_alarm sysfs attribute Guenter Roeck
2010-12-09 21:26 ` Ira W. Snyder
2010-12-09 21:48 ` Guenter Roeck
2010-12-10  0:07 ` Ira W. Snyder
2010-12-10 14:36 ` Jean Delvare
2010-12-10 14:37 ` Jean Delvare
2010-12-10 15:12 ` Guenter Roeck [this message]
2010-12-10 15:15 ` Guenter Roeck
2010-12-10 16:00 ` Jean Delvare
2010-12-10 16:18 ` Guenter Roeck
2010-12-10 16:30 ` Jean Delvare
2010-12-10 16:56 ` Guenter Roeck
2010-12-10 19:07 ` Guenter Roeck
2010-12-12 17:10 ` Jean Delvare
2010-12-12 19:49 ` Guenter Roeck
2010-12-12 20:17 ` Jean Delvare
2010-12-12 21:04 ` Guenter Roeck
2010-12-12 21:20 ` Jean Delvare
2010-12-12 23:11 ` Guenter Roeck

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=20101210151209.GA11777@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.