linux-stable/drivers
Mika Westerberg 77c2d7929d gpiolib: Allow GPIO chips to request their own GPIOs
Sometimes it is useful to allow GPIO chips themselves to request GPIOs they
own through gpiolib API. One use case is ACPI ASL code that should be able
to toggle GPIOs through GPIO operation regions.

We can't use gpio_request() because it will pin the module to the kernel
forever (it calls try_module_get()). To solve this we move module refcount
manipulation to gpiod_request() and let __gpiod_request() handle the actual
request. This changes the sequence a bit as now try_module_get() is called
outside of gpio_lock (I think this is safe, try_module_get() handles
serialization it needs already).

Then we provide gpiolib internal functions gpiochip_request/free_own_desc()
that do the same as gpio_request() but don't manipulate module refrence
count. This allows the GPIO chip driver to request and free descriptors it
owns without being pinned to the kernel forever.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-03-13 10:32:18 +01:00
..
accessibility
acpi Merge branches 'acpi-processor', 'acpi-hotplug', 'acpi-init', 'acpi-pm' and 'acpica' 2014-01-29 11:47:18 +01:00
amba
ata ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
atm
auxdisplay
base regmap: Updates for v3.14 2014-01-25 13:18:00 -08:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
block Bug-fixes: 2014-01-31 08:38:18 -08:00
bluetooth
bus drivers: bus: fix CCI driver kcalloc call parameters swap 2014-01-31 15:15:13 -08:00
cdrom Merge branch 'for-3.14/drivers' of git://git.kernel.dk/linux-block 2014-01-30 11:40:10 -08:00
char ipmi: Add missing rv in ipmi_parisc_probe() 2014-01-30 10:02:54 -08:00
clk The second half of the clock framework pull requeust for 3.14 is 2014-01-28 18:44:53 -08:00
clocksource clocksource: kona: Add basic use of external clock 2014-01-31 21:04:01 -08:00
connector
cpufreq ACPI and power management fixes and cleanups for 3.14-rc1 2014-01-31 09:23:52 -08:00
cpuidle powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. 2014-01-29 17:02:24 +11:00
crypto ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
dca
devfreq Merge branches 'pm-cpufreq' and 'pm-devfreq' 2014-01-29 11:48:23 +01:00
dio
dma Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-01-29 20:27:23 -08:00
edac
eisa
extcon
firewire
firmware firmware/google: drop 'select EFI' to avoid recursive dependency 2014-01-27 21:02:40 -08:00
fmc
gpio gpiolib: Allow GPIO chips to request their own GPIOs 2014-03-13 10:32:18 +01:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-01-29 20:49:12 -08:00
hid Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-01-31 09:31:14 -08:00
hsi
hv hyperv: Add support for physically discontinuous receive buffer 2014-01-27 16:40:45 -08:00
hwmon hwmon: Fix SENSORS_TMP102 dependencies to eliminate build errors 2014-02-02 17:59:07 +01:00
hwspinlock
i2c Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-01-29 19:56:20 -08:00
ide drivers: ide: Include appropriate header file in ide-pio-blacklist.c 2014-01-28 23:35:09 -08:00
idle ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
iio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-01-22 21:21:55 -08:00
infiniband Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-01-31 15:31:23 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-01-24 17:17:30 -08:00
iommu IOMMU Updates for Linux v3.14 2014-01-29 20:00:13 -08:00
ipack
irqchip mvebu fixes for v3.13 (incremental #2) 2014-01-31 14:59:28 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2014-01-28 18:53:01 -08:00
lguest
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-01-27 21:11:26 -08:00
mailbox drivers/mailbox/omap: make mbox->irq signed for error handling 2014-01-23 16:36:53 -08:00
md Merge branch 'for-3.14/drivers' of git://git.kernel.dk/linux-block 2014-01-30 11:40:10 -08:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-01-31 09:31:14 -08:00
memory
memstick drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug 2014-01-23 16:37:04 -08:00
message Merge branch 'for-3.14/core' of git://git.kernel.dk/linux-block 2014-01-30 11:19:05 -08:00
mfd regulator: Updates for v3.14 2014-01-25 13:19:10 -08:00
misc Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2014-01-29 18:56:27 -08:00
mmc MMC highlights for 3.14: 2014-01-26 11:00:41 -08:00
mtd * Improve the NOR erasure quirk - now it tries to do as little writes as 2014-01-30 20:04:09 -08:00
net Merge branch 'akpm' (patches from Andrew Morton) 2014-01-30 18:44:44 -08:00
nfc
ntb
nubus
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
oprofile
parisc
parport
pci Revert "PCI: Remove from bus_list and release resources in pci_release_dev()" 2014-02-01 10:24:31 -08:00
pcmcia PCI changes for the v3.14 merge window: 2014-01-22 16:39:28 -08:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
pinctrl ARM: SoC DT updates for 3.14 2014-01-23 18:45:38 -08:00
platform platform/chrome: Cleanups and improvements 2014-01-29 20:06:01 -08:00
pnp
power Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
powercap
pps
ps3
ptp
pwm pwm: Changes for v3.14-rc1 2014-01-27 08:15:51 -08:00
rapidio
regulator regulator: Updates for v3.14 2014-01-25 13:19:10 -08:00
remoteproc
reset
rpmsg
rtc Merge branch 'akpm' (incoming from Andrew) 2014-01-23 19:11:50 -08:00
s390 Second batch of KVM updates. Some minor x86 fixes, 2014-01-31 08:37:32 -08:00
sbus sparc: delete non-required instances of include <linux/init.h> 2014-01-28 23:38:23 -08:00
scsi Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-01-31 15:31:23 -08:00
sfi
sh
sn
spi Merge remote-tracking branch 'agust/next' into next 2014-01-29 16:53:55 +11:00
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
staging Staging wireless driver for 3.14-rc1 2014-02-01 10:29:59 -08:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-01-31 15:31:23 -08:00
tc
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-01-24 17:13:49 -08:00
tty Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
uio
usb Merge remote-tracking branch 'agust/next' into next 2014-01-29 16:53:55 +11:00
uwb
vfio Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-01-27 21:11:26 -08:00
vhost Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-01-31 15:31:23 -08:00
video parisc/sti_console: prefer Linux fonts over built-in ROM fonts 2014-02-02 20:56:47 +01:00
virt
virtio A few simple fixes. Quiet cycle. 2014-01-22 22:24:35 -08:00
vlynq drivers/vlynq/vlynq.c: fix another resource size off by 1 error 2014-01-23 16:36:55 -08:00
vme
w1 drivers/w1/masters/w1-gpio.c: add strong pullup emulation 2014-01-23 16:37:04 -08:00
watchdog watchdog: w83627hf_wdt: Reset watchdog trigger during initialization 2014-01-28 21:35:40 +01:00
xen Bug-fixes: 2014-01-31 08:38:18 -08:00
zorro
Kconfig
Makefile