linux/drivers
Marko Katic 1581b088fc backlight: corgi_lcd: Use gpio_set_value_cansleep() to avoid WARN_ON
Changing backlight intensity on an Akita (Sharp Zaurus C-1000) triggers
WARN_ON message:

  WARNING: at drivers/gpio/gpiolib.c:1672 __gpio_set_value+0x38/0xa4()
  Modules linked in:
  Backtrace:
    corgi_bl_set_intensity+0x0/0x74
    corgi_bl_update_status+0x0/0x64
    corgi_lcd_probe+0x0/0x258
    spi_drv_probe+0x0/0x24
    driver_probe_device+0x0/0x208
    __driver_attach+0x0/0x94
    bus_for_each_dev+0x0/0x90
    driver_attach+0x0/0x28
    bus_add_driver+0x0/0x22c
    driver_register+0x0/0x134
    spi_register_driver+0x0/0x60
    corgi_lcd_driver_init+0x0/0x1c
    do_one_initcall+0x0/0x174
    kernel_init+0x0/0x2a8

Akita machines have backlight controls hooked to a gpio expander chip,
max7310 using i2c transfers which can sleep.  In this case,
pca953x_gpio_set_value() can be called to control gpio, and
pca953x_setup_gpio() sets can_sleep flag.  Therefore,
gpio_set_value_cansleep() should be used in order to avoid WARN_ON on
akita machines.

Akita is the only exception in this case since other users of corgi_lcd
access backlight gpio controls through a different gpio expander which
does not set the can_sleep flag.

Signed-off-by: Marko Katic <dromede@gmail.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-17 17:15:17 -08:00
..
accessibility
acpi Merge branch 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-12-14 10:03:23 -08:00
amba ARM: arm-soc: Cleanups on various subarchitectures 2012-12-12 11:51:39 -08:00
ata 1) More ACPI fixes 2012-12-15 12:37:18 -08:00
atm solos-pci: fix double-free of TX skb in DMA mode 2012-12-12 00:16:47 -05:00
auxdisplay
base Merge branch 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-12-14 09:59:59 -08:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-12-14 14:27:45 -08:00
block
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
bus ARM: OMAP: Fix drivers to depend on omap for internal devices 2012-12-16 15:23:37 -08:00
cdrom
char Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-12-17 08:26:17 -08:00
clk ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
clocksource ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
connector
cpufreq ACPI and power management updates for 3.8-rc1 2012-12-11 12:45:35 -08:00
cpuidle ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-12-15 12:35:19 -08:00
dca
devfreq Merge branch 'pm-devfreq' 2012-12-07 23:13:36 +01:00
dio
dma dmatest: check for dma mapping error 2012-12-17 17:15:13 -08:00
edac Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-12-14 14:27:45 -08:00
eisa
extcon extcon pull request targetting Linux 3.8 for Greg KH on 2012.11.22 2012-11-27 06:44:10 -08:00
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
firmware Merge branch 'core-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-12-14 10:08:40 -08:00
gpio This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-12-17 08:26:17 -08:00
hid Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-12-13 19:22:22 -08:00
hsi
hv
hwmon ARM: arm-soc: driver specific changes 2012-12-13 10:59:11 -08:00
hwspinlock hwspinlock: remove use of __devexit 2012-11-28 11:41:36 -08:00
i2c This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
ide
idle cpuidle: Measure idle state durations with monotonic clock 2012-11-27 14:17:58 +01:00
iio This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
infiniband Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2012-12-15 14:25:10 -08:00
input This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
iommu ARM: arm-soc: Header cleanups 2012-12-12 11:45:16 -08:00
ipack TTY/Serial merge for 3.8-rc1 2012-12-11 14:08:47 -08:00
irqchip ARM: arm-soc: Device-tree updates, take 2 2012-12-14 14:42:53 -08:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2012-12-15 12:52:42 -08:00
lguest
macintosh bootmem: fix wrong call parameter for free_bootmem() 2012-12-11 17:22:28 -08:00
md Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
media fbdev changes for 3.8: 2012-12-15 13:03:48 -08:00
memory
memstick
message messages: i2o: Fix typo in messages/i2o 2012-11-28 17:13:59 +01:00
mfd This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
misc Sound updates for 3.8-rc1 2012-12-13 11:51:23 -08:00
mmc This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
net drivers: remove reference to feature-removal-schedule.txt 2012-12-17 17:15:12 -08:00
nfc
nubus
of Two minor devicetree fixups for v3.8. Addition of dummy inlines and 2012-12-14 15:37:46 -08:00
oprofile
parisc
parport
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2012-12-13 14:20:19 -08:00
pcmcia ARM: arm-soc: Header cleanups 2012-12-12 11:45:16 -08:00
pinctrl ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00
platform Corentin has moved 2012-12-17 17:15:14 -08:00
pnp Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
power This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
pps
ps3
ptp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
pwm pwm: remove use of __devexit 2012-11-28 12:23:41 -08:00
rapidio Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
regulator Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
remoteproc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
rpmsg
rtc This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2012-12-13 14:20:19 -08:00
sbus
scsi Merge branch 'for-3.8/core' of git://git.kernel.dk/linux-block 2012-12-17 08:27:23 -08:00
sfi
sh
sn
spi SPI changes for v3.8 2012-12-13 19:15:11 -08:00
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-12-14 14:27:45 -08:00
staging fbdev changes for 3.8: 2012-12-15 13:03:48 -08:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2012-12-15 14:25:10 -08:00
tc
thermal Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
tty Merge tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-12-13 15:31:08 -08:00
uio ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
usb usb: musb: use io{read,write}*_rep accessors 2012-12-17 17:15:13 -08:00
uwb
vfio
vhost Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2012-12-15 14:25:10 -08:00
video backlight: corgi_lcd: Use gpio_set_value_cansleep() to avoid WARN_ON 2012-12-17 17:15:17 -08:00
virt
virtio virtio_balloon: introduce migration primitives to balloon pages 2012-12-11 17:22:27 -08:00
vlynq
vme
w1 ARM: OMAP: Fix drivers to depend on omap for internal devices 2012-12-16 15:23:37 -08:00
watchdog Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
xen Feature: 2012-12-16 17:39:14 -08:00
zorro
Kconfig
Makefile