1
linux/drivers/i2c/muxes
Jean Delvare e7ee514058 i2c-mux-gpio: Add support for dynamically allocated GPIO pins
The code instantiating an i2c-mux-gpio platform device doesn't
necessarily know in advance the GPIO pin numbers it wants to use. If
pins are on a GPIO device which gets its base GPIO number assigned
dynamically at run-time, the values can't be hard-coded.

In that case, let the caller tell i2c-mux-gpio the name of the GPIO
chip and the (relative) GPIO pin numbers to use. At probe time, the
i2c-mux-gpio driver will look for the chip and apply the proper offset
to turn relative GPIO pin numbers to absolute GPIO pin numbers.

The same could be (and was so far) done on the caller's end, however
doing it in i2c-mux-gpio has two benefits:
* It avoids duplicating the code on every caller's side (about 30
  lines of code.)
* It allows for deferred probing for the muxed part of the I2C bus
  only. If finding the GPIO chip is the caller's responsibility, then
  deferred probing (if the GPIO chip isn't there yet) will not only
  affect the mux and the I2C bus segments behind it, but also the I2C
  bus trunk.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Korsgaard <peter.korsgaard@barco.com>
2012-10-05 22:23:54 +02:00
..
i2c-mux-gpio.c i2c-mux-gpio: Add support for dynamically allocated GPIO pins 2012-10-05 22:23:54 +02:00
i2c-mux-pca954x.c i2c-mux: Add support for device auto-detection 2012-10-05 22:23:51 +02:00
i2c-mux-pca9541.c i2c-mux: Add support for device auto-detection 2012-10-05 22:23:51 +02:00
i2c-mux-pinctrl.c i2c-mux: Add support for device auto-detection 2012-10-05 22:23:51 +02:00
Kconfig i2c: Add generic I2C multiplexer using pinctrl API 2012-06-04 16:49:43 +02:00
Makefile i2c: Add generic I2C multiplexer using pinctrl API 2012-06-04 16:49:43 +02:00