Re: Registering I2C devices on X86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thanks for quick feedback!

On 06/02/2010 01:04 PM, Jean Delvare wrote:
On Wed, 2 Jun 2010 12:36:50 +0200, Wolfram Sang wrote:
Any ideas or suggestions?

Do it in userspace, or is this too late?

The user-space interface only works for simple cases: you can't pass
platform data or irq numbers. If someone needs to do this, we need an
extended interface, probably using configfs.

Yeah I think it's a common case to provide platform data and interrupt numbers. At least I see the need for it on our platforms.


Documentation/i2c/instantiating-devices lists all options you have.

Richard, look at drivers/i2c/busses/i2c-i801.c, function i801_probe():
you'll see an example of per-platform I2C device instantiation on x86.
I'm not claiming it is elegant, but it works.

The "problem" I see is that the CPU and the chipset + I2C chip will be populated on several different boards. It would mean that the I2C bus driver would need knowledge of all the boards where it is used. And the bus driver itself can not really detect which board it's running on.

That is why I kept the I2C device setup in a separate driver. So each board would have a separate "setup" driver. Isn't that the most clean solution right now?

Thanks
--Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux