linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Pokorny <ppokorny@penguincomputing.com>
To: LM Sensors <sensors@stimpy.netroedge.com>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Greg KH <greg@kroah.com>
Subject: Re: [RFC] I2C: Remove the i2c_client id field
Date: Tue, 28 Dec 2004 08:36:46 -0800	[thread overview]
Message-ID: <41D18B9E.2080706@penguincomputing.com> (raw)
In-Reply-To: <20041228114258.35e9b5b7.khali@linux-fr.org>

Jean Delvare wrote:

>Hi Philip,
>
>  
>
>>So only the drives I wrote use the ID in a meaningful way?
>>    
>>
>
>True, providing we limit our consideration to the hardware monitoring
>drivers. Even in your drivers, the meaningfulness is discussable.
>
>The lm85 driver simply displays the assigned id once (at the time it
>assigns it). Since the id is then never used, I would consider the lm85
>driver similar to the other hardware monitoring drivers.
>  
>

Oops.  I probably should have used the ID in the debug messages...  I 
guess it doesn't matter now.

>The adm1026 driver, OTOH, does use the id value in all debug messages,
>and it also only reconfigures the GPIO pins for the first client only
>(id == 0). Although this is a real use of the id, it only matters if you
>use the module parameters for GPIO pins reconfiguration and actually
>have more than one ADM1026 chip (a quite rare chip if you remember).
>
Not for me.  We ship hundreds of systems each month with a motherboard 
with that chip on it.  I think it's actually on two different 
motherboards we sell.

> You
>don't necessarily know which ADM1026 will get id 0 anyway (if the chips
>are on different busses it depends on the order the bus drivers were
>loaded in),
>
Wouldn't a force_xxx parameter cause a specific bus/id to be probed and 
assigned first?

> and I am not sure why one would want to reprogram only the
>first chip. Unless someone comes with such a specific hardware setup so
>that we can examine what is really needed,
>
Well, that's exactly the problem that I had.  The motherboard vendor's 
BIOS didn't set the chip up and I had to program it myself.  I got the 
schematics from the vendor for the part of the motherboard attached to 
the chip so that I could program it correctly.

> I think we can get rid of the
>"id == 0" test and reconfigure "all" ADM1026 chips (which really is only
>one for the two known boards using an ADM1026).
>  
>
I think that would be a bad idea.  Reprogramming any chip is generally a 
bad idea (as we can see from the recent removal of all the init code) 
and forcing any specified config to apply to all chips found in the 
system would be an even worse idea.

I think a better idea that addresses your concerns about bus ordering 
would be to add an additional parameter that is a bus/chip number pair 
which is the chip to initialize.  Something like:

static int gpio_target[2] = { -1, -1 }
MODULE_PARM(gpio_target, "2i");
MODULE_PARM_DESC(gpio_target,"Address of chip to whose GPIO is to be 
programmed");

This would be similar to the bus/address pairs used in the 
force_subclient parameters to the w83781d driver.

>BTW, does anyone really use the GPIO pins reconfiguration parameters?
>  
>

Not anymore, but I did as I mention above.

:v)


  reply	other threads:[~2004-12-28 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-27 22:04 [RFC] I2C: Remove the i2c_client id field Jean Delvare
2004-12-27 23:00 ` Philip Pokorny
2004-12-28 10:42   ` Jean Delvare
2004-12-28 16:36     ` Philip Pokorny [this message]
2004-12-28 17:22       ` Jean Delvare
2005-01-06 23:12 ` Greg KH

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=41D18B9E.2080706@penguincomputing.com \
    --to=ppokorny@penguincomputing.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /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).