All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [RFT][PATCH 1/2] hwmon: (adm9240) Avoid forward declaration
Date: Fri, 04 Jul 2014 20:20:27 +0000	[thread overview]
Message-ID: <20140704222027.4718162e@endymion.delvare> (raw)
In-Reply-To: <1404395989.4895.12.camel@phoenix>

Hi Guenter,

On Fri, 04 Jul 2014 10:10:14 -0700, Guenter Roeck wrote:
> On 07/04/2014 05:23 AM, Jean Delvare wrote:
> > Note that support for banked registers could be added if you think this
> > would help.
> 
> That would be quite useful. How would you implement it, though ? You would have
> to have a means to tell the driver "this is a bank register". Another module
> parameter, maybe ?

Not just "this is a bank register". You also most specify which bits
set the bank number (which in turn define the maximum number of banks),
and the range of banked registers.

I did not think about it in depth yet, but there are two options that
come to my mind: module parameters indeed, or sysfs attributes. We
could create a sysfs directory for every client address and have
writable attributes bank_reg, bank_mask, banked_start_reg and
banked_end_reg in that directory. Not sure exactly where actually,
maybe we would need to introduce a virtual i2c-stub device, or use
debugfs.

Module parameters would work too, that's probably easier to implement
that way, but that's also less flexible, as you have to setup
everything upon module loading. That might be just fine though, as
being able to change the bank setup at run-time has little practical
value IMHO.

-- 
Jean Delvare
SUSE L3 Support

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

  parent reply	other threads:[~2014-07-04 20:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 13:59 [lm-sensors] [RFT][PATCH 1/2] hwmon: (adm9240) Avoid forward declaration Axel Lin
2014-07-04  5:39 ` Grant Coady
2014-07-04  7:36 ` Guenter Roeck
2014-07-04 12:23 ` Jean Delvare
2014-07-04 15:16 ` Guenter Roeck
2014-07-04 17:10 ` Guenter Roeck
2014-07-04 20:20 ` Jean Delvare [this message]
2014-07-05  1:01 ` Guenter Roeck
2014-07-05  8:53 ` Jean Delvare
2014-07-05 13:39 ` Guenter Roeck
2014-07-05 14:43 ` Guenter Roeck
2014-07-05 18:20 ` Jean Delvare
2014-07-05 18:48 ` Guenter Roeck
2014-07-06  7:29 ` Jean Delvare
2014-07-06  8:16 ` 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=20140704222027.4718162e@endymion.delvare \
    --to=jdelvare@suse.de \
    --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.