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