From: Jean Delvare <khali@linux-fr.org>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>,
Randy Dunlap <rdunlap@xenotime.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
lm-sensors@lm-sensors.org
Subject: Re: [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate
Date: Thu, 16 Sep 2010 16:01:12 +0000 [thread overview]
Message-ID: <20100916180112.2ce29d2a@hyperion.delvare> (raw)
In-Reply-To: <20100916154243.GB25145@khazad-dum.debian.net>
On Thu, 16 Sep 2010 12:42:43 -0300, Henrique de Moraes Holschuh wrote:
> On Thu, 16 Sep 2010, Jean Delvare wrote:
> > On Wed, 15 Sep 2010 19:07:14 -0700, Guenter Roeck wrote:
> > > The attribute reflects an interval, not a rate.
> > >
> > > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > > ---
> > > Documentation/hwmon/sysfs-interface | 12 +++++-----
> > > drivers/hwmon/adm1031.c | 43 +++++++++++++++++++---------------
> > > 2 files changed, 30 insertions(+), 25 deletions(-)
> > >
> > > diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
> > > index ff45d1f..df0cdd2 100644
> > > --- a/Documentation/hwmon/sysfs-interface
> > > +++ b/Documentation/hwmon/sysfs-interface
> > > @@ -91,13 +91,13 @@ name The chip name.
> > > I2C devices get this attribute created automatically.
> > > RO
> > >
> > > -update_rate The rate at which the chip will update readings.
> > > - Unit: millisecond
> > > +update_interval The interval at which the chip or driver will update readings.
> >
> > I think I prefer the original wording. The attribute is really about
> > setting the register refresh rate at the hardware level. The fact that
>
> Only, it doesn't set any rates in the hardware. It sets the period
> (interval).
>
> If the unit of update_rate is changed to Hz, and the driver does
> hardware_timer_milliseconds = 1000/update_rate_Hz, THEN it will be
> correct to call it a rate...
I agree. My point was really only about "chip or driver" vs. "chip".
> I'd rather have it in Hz, actually. I consider that more user-friendly.
> But that's just personal preference.
The problem with Hz is that we need to be able to handle values lower
than 1, and mHz as a unit isn't exactly friendly. I would be very fine
with Hz (especially as we use it for pwmN_freq already) if we didn't
have to support frequencies below 1 Hz. For such low frequencies,
period (or interval) is clearer than frequency IMHO.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>,
Randy Dunlap <rdunlap@xenotime.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
lm-sensors@lm-sensors.org
Subject: Re: [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval
Date: Thu, 16 Sep 2010 18:01:12 +0200 [thread overview]
Message-ID: <20100916180112.2ce29d2a@hyperion.delvare> (raw)
In-Reply-To: <20100916154243.GB25145@khazad-dum.debian.net>
On Thu, 16 Sep 2010 12:42:43 -0300, Henrique de Moraes Holschuh wrote:
> On Thu, 16 Sep 2010, Jean Delvare wrote:
> > On Wed, 15 Sep 2010 19:07:14 -0700, Guenter Roeck wrote:
> > > The attribute reflects an interval, not a rate.
> > >
> > > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > > ---
> > > Documentation/hwmon/sysfs-interface | 12 +++++-----
> > > drivers/hwmon/adm1031.c | 43 +++++++++++++++++++---------------
> > > 2 files changed, 30 insertions(+), 25 deletions(-)
> > >
> > > diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
> > > index ff45d1f..df0cdd2 100644
> > > --- a/Documentation/hwmon/sysfs-interface
> > > +++ b/Documentation/hwmon/sysfs-interface
> > > @@ -91,13 +91,13 @@ name The chip name.
> > > I2C devices get this attribute created automatically.
> > > RO
> > >
> > > -update_rate The rate at which the chip will update readings.
> > > - Unit: millisecond
> > > +update_interval The interval at which the chip or driver will update readings.
> >
> > I think I prefer the original wording. The attribute is really about
> > setting the register refresh rate at the hardware level. The fact that
>
> Only, it doesn't set any rates in the hardware. It sets the period
> (interval).
>
> If the unit of update_rate is changed to Hz, and the driver does
> hardware_timer_milliseconds = 1000/update_rate_Hz, THEN it will be
> correct to call it a rate...
I agree. My point was really only about "chip or driver" vs. "chip".
> I'd rather have it in Hz, actually. I consider that more user-friendly.
> But that's just personal preference.
The problem with Hz is that we need to be able to handle values lower
than 1, and mHz as a unit isn't exactly friendly. I would be very fine
with Hz (especially as we use it for pwmN_freq already) if we didn't
have to support frequencies below 1 Hz. For such low frequencies,
period (or interval) is clearer than frequency IMHO.
--
Jean Delvare
next prev parent reply other threads:[~2010-09-16 16:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 2:07 [lm-sensors] [PATCH 0/2] hwmon: Replace update_rate sysfs attribute Guenter Roeck
2010-09-16 2:07 ` [PATCH 0/2] hwmon: Replace update_rate sysfs attribute with update_interval Guenter Roeck
2010-09-16 2:07 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs Guenter Roeck
2010-09-16 2:07 ` [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Guenter Roeck
2010-09-16 15:14 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Jean Delvare
2010-09-16 15:14 ` [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Jean Delvare
2010-09-16 15:37 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Guenter Roeck
2010-09-16 15:37 ` [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Guenter Roeck
2010-09-16 16:42 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Jean Delvare
2010-09-16 16:42 ` [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Jean Delvare
2010-09-16 19:43 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Guenter Roeck
2010-09-16 19:43 ` [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Guenter Roeck
2010-09-16 21:02 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Jean Delvare
2010-09-16 21:02 ` [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Jean Delvare
2010-09-16 21:39 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Guenter Roeck
2010-09-16 21:39 ` [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Guenter Roeck
2010-09-16 15:42 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Henrique de Moraes Holschuh
2010-09-16 15:42 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Henrique de Moraes Holschuh
2010-09-16 16:01 ` Jean Delvare [this message]
2010-09-16 16:01 ` Jean Delvare
2010-09-16 16:54 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Henrique de Moraes Holschuh
2010-09-16 16:54 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Henrique de Moraes Holschuh
2010-09-16 15:14 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate Ira W. Snyder
2010-09-16 15:14 ` [lm-sensors] [PATCH 1/2] hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval Ira W. Snyder
2010-09-16 2:07 ` [lm-sensors] [PATCH 2/2] hwmon: (lm95241) Replace rate sysfs Guenter Roeck
2010-09-16 2:07 ` [PATCH 2/2] hwmon: (lm95241) Replace rate sysfs attribute with update_interval Guenter Roeck
2010-09-16 15:19 ` [lm-sensors] [PATCH 2/2] hwmon: (lm95241) Replace rate sysfs Jean Delvare
2010-09-16 15:19 ` [PATCH 2/2] hwmon: (lm95241) Replace rate sysfs attribute with update_interval Jean Delvare
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=20100916180112.2ce29d2a@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=guenter.roeck@ericsson.com \
--cc=hmh@hmh.eng.br \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=rdunlap@xenotime.net \
/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.