1
0
Fork 0
alistair23-linux/drivers
David Brownell d2876d08d8 gpiolib: add gpio provider infrastructure
Provide new implementation infrastructure that platforms may choose to use
when implementing the GPIO programming interface.  Platforms can update their
GPIO support to use this.  In many cases the incremental cost to access a
non-inlined GPIO should be less than a dozen instructions, with the memory
cost being about a page (total) of extra data and code.  The upside is:

  * Providing two features which were "want to have (but OK to defer)" when
    GPIO interfaces were first discussed in November 2006:

    -	A "struct gpio_chip" to plug in GPIOs that aren't directly supported
	by SOC platforms, but come from FPGAs or other multifunction devices
	using conventional device registers (like UCB-1x00 or SM501 GPIOs,
	and southbridges in PCs with more open specs than usual).

    -	Full support for message-based GPIO expanders, where registers are
	accessed through sleeping I/O calls.  Previous support for these
	"cansleep" calls was just stubs.  (One example: the widely used
	pcf8574 I2C chips, with 8 GPIOs each.)

  * Including a non-stub implementation of the gpio_{request,free}() calls,
    making those calls much more useful.  The diagnostic labels are also
    recorded given DEBUG_FS, so /sys/kernel/debug/gpio can show a snapshot
    of all GPIOs known to this infrastructure.

The driver programming interfaces introduced in 2.6.21 do not change at all;
this infrastructure is entirely below those covers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Eric Miao <eric.miao@marvell.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:12 -08:00
..
acorn/char
acpi drivers/acpi/: Spelling fixes 2008-02-03 17:06:17 +02:00
amba
ata iommu sg merging: sata_inic162x: use pci_set_dma_max_seg_size 2008-02-05 09:44:11 -08:00
atm
auxdisplay
base Driver core: Remove unneeded get_{device,driver}() calls. 2008-02-02 15:14:49 -08:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2008-02-04 08:00:54 -08:00
bluetooth pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
cdrom ide-cd: move lba_to_msf() and msf_to_lba() to <linux/cdrom.h> 2008-02-01 23:09:24 +01:00
char pcmcia: convert some internal-only ioaddr_t to unsigned int 2008-02-05 09:44:08 -08:00
clocksource
connector [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
cpufreq cpufreq: fix obvious condition statement error 2008-01-30 13:33:34 +01:00
cpuidle
crypto
dca
dio dio: fix kernel-doc notation 2008-02-03 16:29:12 +02:00
dma
edac drivers/edac/: Spelling fixes 2008-02-03 17:12:34 +02:00
eisa
firewire firewire: fw-sbp2: Use sbp2 device-provided mgt orb timeout for logins 2008-01-30 22:22:29 +01:00
firmware drivers/firmware/: Spelling fixes 2008-02-03 17:13:40 +02:00
gpio gpiolib: add gpio provider infrastructure 2008-02-05 09:44:12 -08:00
hid
hwmon
i2c PCI: Remove users of pci_enable_device_bars() 2008-02-01 15:04:27 -08:00
ide Spelling fixes: lenght->length 2008-02-03 15:42:53 +02:00
ieee1394 ieee1394: sbp2: fix bogus s/g access change 2008-02-02 13:48:16 +01:00
infiniband [SCSI] remove use_sg_chaining 2008-01-30 13:14:02 -06:00
input drivers/input/: Spelling fixes 2008-02-03 17:15:20 +02:00
isdn drivers/isdn/: Spelling fixes 2008-02-03 17:16:28 +02:00
leds
lguest virtio: reset function 2008-02-04 23:50:03 +11:00
macintosh Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2008-02-04 07:58:52 -08:00
mca
md
media drivers/media/: Spelling fixes 2008-02-03 17:18:59 +02:00
message drivers/message/: Spelling fixes 2008-02-03 17:21:01 +02:00
mfd
misc
mmc
mtd drivers/mtd/: Spelling fixes 2008-02-03 17:22:34 +02:00
net pcmcia/pcnet_cs: fix 'shadow variable' warning 2008-02-05 09:44:09 -08:00
nubus drivers/nubus/: Spelling fixes 2008-02-03 17:23:36 +02:00
of
oprofile
parisc iommu sg merging: parisc: make iommu respect the segment size limits 2008-02-05 09:44:10 -08:00
parport Spelling fixes: lenght->length 2008-02-03 15:42:53 +02:00
pci iommu sg merging: PCI: add dma segment boundary support 2008-02-05 09:44:12 -08:00
pcmcia drivers/pcmcia: add missing pci_dev_get 2008-02-05 09:44:09 -08:00
pnp git-x86: drivers/pnp/pnpbios/bioscalls.c build fix 2008-01-30 13:32:31 +01:00
power apm_power: check I.intval for zero value, we use it as the divisor 2008-02-02 02:44:34 +03:00
ps3
rapidio Merge branch 'linux-2.6' 2008-01-31 11:25:51 +11:00
rtc
s390 [SCSI] zfcp: fix sense_buffer access bug 2008-01-30 13:03:39 -06:00
sbus
scsi iommu sg merging: call dma_set_seg_boundary in __scsi_alloc_queue() 2008-02-05 09:44:12 -08:00
serial serial: MPSC: set baudrate when BRG divider is set. 2008-02-05 09:44:10 -08:00
sh
sn
spi Spelling fixes: lenght->length 2008-02-03 15:42:53 +02:00
ssb drivers/ssb/: Spelling fixes 2008-02-03 17:30:25 +02:00
tc
telephony
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6 2008-02-02 14:29:33 +11:00
video drivers/video/: Spelling fixes 2008-02-03 17:31:49 +02:00
virtio virtio: balloon driver 2008-02-04 23:50:13 +11:00
w1
watchdog drivers/watchdog/: Spelling fixes 2008-02-03 17:32:52 +02:00
xen
zorro
Kconfig gpiolib: add drivers/gpio directory 2008-02-05 09:44:12 -08:00
Makefile gpiolib: add drivers/gpio directory 2008-02-05 09:44:12 -08:00