[i2c] How to pass board specific info to I2C driver module
B21284 at freescale.com
Mon Oct 27 03:00:44 CET 2008
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
but the chip uses the same driver.
Any other idea? Please give me some advice. Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the i2c