linux/drivers
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
..
accessibility
acpi Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
amba
ata SCSI for-linus on 20121002 2012-10-02 19:01:32 -07:00
atm sections: fix section conflicts in drivers/atm 2012-10-06 03:04:40 +09:00
auxdisplay
base firmware: use 'kernel_read()' to read firmware into kernel buffer 2012-10-04 09:19:02 -07:00
bcma bcma: change delays to follow timers-howto guide 2012-09-28 13:54:02 -04:00
block aoe: update aoe-internal version number to 50 2012-10-06 03:05:30 +09:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
bus drivers: bus: omap_l3: fixup merge conflict resolution 2012-10-01 19:39:48 -07:00
cdrom
char sections: fix section conflicts in drivers/char 2012-10-06 03:04:41 +09:00
clk spi: Updates for v3.7 2012-10-02 17:26:42 -07:00
clocksource Power management updates for 3.7-rc1 2012-10-02 18:32:35 -07:00
connector Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
cpufreq Power management updates for 3.7-rc1 2012-10-02 18:32:35 -07:00
cpuidle cpuidle: rename function name "__cpuidle_register_driver", v2 2012-09-22 00:38:32 +02:00
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
dca
devfreq
dio
dma drivers/dma/dmaengine.c: lower the priority of 'failed to get' dma channel message 2012-10-06 03:04:36 +09:00
edac Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
eisa
extcon Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
firewire firewire: addendum to address handler RCU conversion 2012-09-28 11:47:42 +02:00
firmware
gpio MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
hid Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
hsi
hv
hwmon ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
hwspinlock
i2c i2c-mux-gpio: Add support for dynamically allocated GPIO pins 2012-10-05 22:23:54 +02:00
ide sections: fix section conflicts in drivers/ide 2012-10-06 03:04:41 +09:00
idle
iio iio: adc: add new lp8788 adc driver 2012-09-22 10:29:19 +01:00
infiniband Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
input MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
iommu PCI changes for the 3.7 merge window: 2012-10-01 12:05:36 -07:00
irqchip irqchip: fill in empty Kconfig 2012-09-24 10:07:40 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
leds MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
lguest
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
md Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
media Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
memory memory: tegra{20,30}-mc: Fix reading incorrect register in mc_readl() 2012-09-26 14:04:09 -07:00
memstick
message
mfd Merge branch 'akpm' (Andrew's patch-bomb) 2012-10-06 03:09:16 +09:00
misc Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
mmc sections: fix section conflicts in drivers/mmc 2012-10-06 03:04:42 +09:00
mtd Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
net Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
nfc NFC: Fix missing mutex unlock in pn533_send_cmd_frame_async 2012-09-27 10:47:48 +02:00
nubus
of Devicetree updates for 3.7 2012-10-03 09:44:08 -07:00
oprofile
parisc
parport
pci Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
pcmcia ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
pinctrl These are the bulk pinctrl changes for kernel v3.7: 2012-10-02 16:20:20 -07:00
platform sections: fix section conflicts in drivers/platform/x86 2012-10-06 03:04:43 +09:00
pnp
power Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
pps idr: rename MAX_LEVEL to MAX_IDR_LEVEL 2012-10-06 03:04:56 +09:00
ps3
ptp ptp: link the phc device to its parent device 2012-09-22 15:42:38 -04:00
pwm MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
rapidio rapidio: add destination ID allocation mechanism 2012-10-06 03:05:23 +09:00
regulator MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
remoteproc - Remoteproc Recovery - by Fernando Guzman Lugo - when a remote processor 2012-10-04 09:11:57 -07:00
rpmsg
rtc Merge branch 'akpm' (Andrew's patch-bomb) 2012-10-06 03:09:16 +09:00
s390 SCSI for-linus on 20121002 2012-10-02 19:01:32 -07:00
sbus drivers/sbus/char: removes unnecessary semicolon 2012-09-21 12:08:56 -07:00
scsi Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
sfi
sh ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
sn
spi Devicetree updates for 3.7 2012-10-03 09:44:08 -07:00
ssb
staging Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
target Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-10-01 09:06:36 -07:00
tc
thermal idr: rename MAX_LEVEL to MAX_IDR_LEVEL 2012-10-06 03:04:56 +09:00
tty Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
uio
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-10-02 20:25:04 -07:00
uwb
vfio switch simple cases of fget_light to fdget 2012-09-26 22:20:08 -04:00
vhost vhost_set_vring(): turn pollstart/pollstop into bool 2012-09-26 21:10:12 -04:00
video Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
virt
virtio
vlynq
vme
w1 char/misc driver merge for 3.7-rc1 2012-10-01 12:09:59 -07:00
watchdog MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
xen Features: 2012-10-02 22:09:10 -07:00
zorro
Kconfig ARM: soc: driver specific changes 2012-10-01 18:46:13 -07:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00