From: Jean Delvare <khali@linux-fr.org>
To: Jeff Angielski <jeff@theptrgroup.com>
Cc: lm-sensors <lm-sensors@lm-sensors.org>,
Linuxppc-dev@lists.ozlabs.org,
Andre Prendel <andre.prendel@gmx.de>
Subject: Re: [PATCH] hwmon: (tmp421) Add nfactor support.
Date: Wed, 12 May 2010 09:27:15 +0200 [thread overview]
Message-ID: <20100512092715.12639dcf@hyperion.delvare> (raw)
In-Reply-To: <4BE9B145.7000702@theptrgroup.com>
Hi Jeff,
On Tue, 11 May 2010 15:34:29 -0400, Jeff Angielski wrote:
> On 05/11/2010 03:03 PM, Andre Prendel wrote:
> > I'de prefer implementing the sysfs access methods in a consistent way (see other functions). That means adding the nfactor register to the tmp421_data structure and using tmp421_update_device() to update the structure.
>
> I did this on purpose since the nfactor typically only changes once at
> runtime when you program it for your sensor. It seemed like a waste of
> processing power and i2c bandwidth to read a "pseudo static" register
> over and over again.
>
> It can easily be changed if that's what will help the community the best.
I get your point and it makes sense. However, we also have to ensure
that no regular user can saturate the I2C link by repeatedly polling
for the same register value. So, any sysfs attribute which triggers an
immediate I2C transaction shouldn't be accessible by regular users
(i.e. change the mode from 0644 to 0640).
An alternative is to slit the cache into short-lived (~ 1 or 2 seconds)
and long-lived (1 to 5 minutes.) A number of drivers do this.
--
Jean Delvare
prev parent reply other threads:[~2010-05-12 7:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 14:43 [PATCH] hwmon: (tmp421) Add nfactor support Jeff Angielski
2010-05-11 19:03 ` Andre Prendel
2010-05-11 19:12 ` Jean Delvare
2010-05-11 19:34 ` Jeff Angielski
2010-05-12 7:27 ` Jean Delvare [this message]
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=20100512092715.12639dcf@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=Linuxppc-dev@lists.ozlabs.org \
--cc=andre.prendel@gmx.de \
--cc=jeff@theptrgroup.com \
--cc=lm-sensors@lm-sensors.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;
as well as URLs for NNTP newsgroup(s).