Re: i2c_get_client() missing?

From: Russell King
Date: Tue Apr 27 2004 - 13:28:46 EST


On Tue, Apr 27, 2004 at 08:35:12AM -0700, Greg KH wrote:
> Where do you need to access it from? Why do all of the current drivers
> not need it?

The "traditional Linux" i2c model is one where the i2c bus is local to
the card, so the overall driver knows where the bus is, and what devices
to expect, and it's all nicely encapsulated.

The variant on that is the i2c sensor stuff, where the individual i2c
bus device drivers export data to userspace themselves.

However, there's another class, where the i2c bus contains things like
RTC and system control stuff, which can be found on embedded devices.
Such an i2c bus is often shared between multiple parts of the system,
and lumping them all together into one massive driver does not make
sense.

For instance, one platform I have here has an i2c bus with a RTC on,
and optionally a couple of EEPROMs giving the dimentions of the memory
on a couple of expansion boards. It doesn't make sense to lump the
RTC code along side the memory controller configuration code, along
with the i2c bus driver.

I2C is much much more than sensors and graphics capture chips.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/