Re: [PATCH v2] hwmon: Update Documentation/hwmon/sysfs-interface

Darrick J. Wong
2007-09-17T18:44:20Z

[-- Attachment #1: Type: text/plain, Size: 2204 bytes --]

On Mon, Sep 17, 2007 at 07:28:08PM +0200, Jean Delvare wrote:
> Thanks for the update. I have some more comments. And sorry if it looks
> like nitpicking, but this is a standard interface we're defining so we
> better make sure that we get it right.

Agreed. :)
>
> First of all, please think of a better subject line for this patch.
> "Update Documentation/hwmon/sysfs-interface" is too vague when your
> patch is rather specific.

Will change to:
"Add power meter spec to Documentation/hwmon/sysfs-interface"

> > +power[1-*]_average_lowest Historical average minimum power use
> > + Unit: microWatt
> > + RO
>
> How useful are historical extremes of an average?

I don't know if anybody ever really requires this data, but the device
I'm talking to records the extremes in hardware, so I put it in the driver.

> > +power[1-*]_high_low_reset Reset input_highest/input_lowest.
> > + WO
>
> I don't much like this name. It sounds like a name crafted for the
> specific feature of a given chip, while we try to use generic names for

Guilty as charged. Since ibmpex is the only on-board power meter hardware
to which I have access, the interface proposal includes the various odd
pieces that the hardware provides in addition to the meters. I
could take the historical extreme and reset bits out of the proposal and
put them in something like Documentation/hwmon/ibmpex.txt as extra
chip-specific features if people prefer that.

> the standard interface. I would rather go for power[1-*]_reset_history

Me too.

> if we have a single file for resetting all the extremes of a given
> channel, or power[1-*]_input_lowest_reset and
> power[1-*]_input_highest_reset if we go for a per-value reset.

The ibmpex hardware only knows how to reset all of them.

> Alternatively, we could simply make the power[1-*]_input_lowest and
> power[1-*]_input_highest files writable, and "cat power1_input >
> power1_input_lowest" (or any write?) would reset the history.

I'd prefer to leave it explicitly called out as a separate sysfs knob,
unless there are established precedents for resetting a sensor by
writing something to its sysfs file.

--D

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]