From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hu Mingkai-B21284" Subject: How to pass board specific info to I2C driver module Date: Mon, 27 Oct 2008 10:00:44 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1075334379608876747==" Return-path: Content-class: urn:content-classes:message List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org Errors-To: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org To: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org List-Id: linux-i2c@vger.kernel.org This is a multi-part message in MIME format. --===============1075334379608876747== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C937D7.D4F3DDC2" This is a multi-part message in MIME format. ------_=_NextPart_001_01C937D7.D4F3DDC2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, =20 I'm working on an ADC chip (MCP3021) driver under Linux 2.6.27. We used these two chips to monitor the CPU core current and=20 platform current individually, which is converted to voltage as=20 the ADC chip's input. As you know, the driver shouldn't contain the board specific info, such as, the chip's work voltage, the ratio of voltage and current. So how to pass these info to the driver module? =20 Here is the way I can think of: 1. to use dts file to pass the info to the module. This way make the driver is bound to OF implement. =20 2. to use the module parameter. For different chips, the work voltage and the ratio may be different, but the chip uses the same driver. =20 Any other idea? Please give me some advice. Thanks a lot. =20 Best Regards, Vincent =20 ------_=_NextPart_001_01C937D7.D4F3DDC2 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi=20 All,
 
I'm = working on an=20 ADC chip (MCP3021) driver under Linux 2.6.27.
We = used these two=20 chips to monitor the CPU core current and
platform current=20 individually, which is converted to voltage as
the = ADC=20 chip's=20 input.
As you = know, the=20 driver shouldn't contain the board specific info,
such = as, the chip's=20 work voltage, the ratio of voltage and = current.
So how = to pass these=20 info to the driver module?
 
Here = is the way I=20 can think of:
1. to = use dts=20 file to pass the info to the module.
   =20 This way make the driver is bound to OF implement.
 
2. to = use the module=20 parameter.
   =20 For different chips, the work voltage and the ratio may be=20 different,
   =20 but the chip uses the same driver.
 
Any = other idea?=20 Please give me some advice. Thanks a lot.
 
Best=20 Regards,
Vincent
 
------_=_NextPart_001_01C937D7.D4F3DDC2-- --===============1075334379608876747== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c --===============1075334379608876747==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: How to pass board specific info to I2C driver module Date: Mon, 27 Oct 2008 09:21:25 +0100 Message-ID: <20081027092125.0192b81c@hyperion.delvare> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org Errors-To: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org To: Hu Mingkai-B21284 Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org List-Id: linux-i2c@vger.kernel.org Hi Vincent, On Mon, 27 Oct 2008 10:00:44 +0800, Hu Mingkai-B21284 wrote: > I'm working on an ADC chip (MCP3021) driver under Linux 2.6.27. > We used these two chips to monitor the CPU core current and > platform current individually, which is converted to voltage as > the ADC chip's input. > As you know, the driver shouldn't contain the board specific info, > such as, the chip's work voltage, the ratio of voltage and current. > So how to pass these info to the driver module? > > Here is the way I can think of: > 1. to use dts file to pass the info to the module. > This way make the driver is bound to OF implement. > > 2. to use the module parameter. > For different chips, the work voltage and the ratio may be > different, > but the chip uses the same driver. > > Any other idea? Please give me some advice. Thanks a lot. Once again this question has nothing to do with I2C, so this is the wrong mailing list. So, once again, please ask on the lm-sensors list instead. -- Jean Delvare _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hu Mingkai-B21284" Subject: Re: How to pass board specific info to I2C driver module Date: Mon, 27 Oct 2008 16:49:15 +0800 Message-ID: References: <20081027092125.0192b81c@hyperion.delvare> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-class: urn:content-classes:message In-Reply-To: <20081027092125.0192b81c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org Errors-To: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org To: Jean Delvare Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org List-Id: linux-i2c@vger.kernel.org I feel so sorry for the inconvenience this mail brought to you all. Sorry again. Br, Vincent -----Original Message----- From: Jean Delvare [mailto:khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org] Sent: Monday, October 27, 2008 4:21 PM To: Hu Mingkai-B21284 Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org Subject: Re: [i2c] How to pass board specific info to I2C driver module Hi Vincent, On Mon, 27 Oct 2008 10:00:44 +0800, Hu Mingkai-B21284 wrote: > I'm working on an ADC chip (MCP3021) driver under Linux 2.6.27. > We used these two chips to monitor the CPU core current and platform > current individually, which is converted to voltage as the ADC chip's > input. > As you know, the driver shouldn't contain the board specific info, > such as, the chip's work voltage, the ratio of voltage and current. > So how to pass these info to the driver module? > > Here is the way I can think of: > 1. to use dts file to pass the info to the module. > This way make the driver is bound to OF implement. > > 2. to use the module parameter. > For different chips, the work voltage and the ratio may be > different, > but the chip uses the same driver. > > Any other idea? Please give me some advice. Thanks a lot. Once again this question has nothing to do with I2C, so this is the wrong mailing list. So, once again, please ask on the lm-sensors list instead.