summaryrefslogtreecommitdiffstats
path: root/drivers/misc/bmp085-i2c.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2016-03-24 10:50:25 -0700
committerLinus Walleij <linus.walleij@linaro.org>2016-04-08 10:10:08 +0200
commit25487533ff311014b0cc39ed7fd721c114e1b11f (patch)
tree47f0df2d5a8311fa1011ccb4e9fbff9b6beeef46 /drivers/misc/bmp085-i2c.c
parent9735a22799b9214d17d3c231fe377fc852f042e9 (diff)
downloadlinux-25487533ff311014b0cc39ed7fd721c114e1b11f.tar.bz2
gpio / ACPI: ignore GpioInt() GPIOs when requesting GPIO_OUT_*
When firmware does not use _DSD properties that allow properly name GPIO resources, the kernel falls back on parsing _CRS resources, and will return entries described as GpioInt() as general purpose GPIOs even though they are meant to be used simply as interrupt sources for the device: Device (ETSA) { Name (_HID, "ELAN0001") ... Method(_CRS, 0x0, NotSerialized) { Name(BUF0,ResourceTemplate () { I2CSerialBus( 0x10, /* SlaveAddress */ ControllerInitiated, /* SlaveMode */ 400000, /* ConnectionSpeed */ AddressingMode7Bit, /* AddressingMode */ "\\_SB.I2C1", /* ResourceSource */ ) GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,, "\\_SB.GPSW") { BOARD_TOUCH_GPIO_INDEX } } ) Return (BUF0) } ... } This gives troubles with drivers such as Elan Touchscreen driver (elants_i2c) that uses devm_gpiod_get to look up "reset" GPIO line and decide whether the driver is responsible for powering up and resetting the device, or firmware is. In the above case the lookup succeeds, we map GPIO as output and later fail to request client->irq interrupt that is mapped to the same GPIO. Let's ignore resources described as GpioInt() while parsing _CRS when requesting output GPIOs (but allow them when requesting GPIOD_ASIS or GPIOD_IN as some drivers, such as i2c-hid, do request GPIO as input and then map it to interrupt with gpiod_to_irq). Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/misc/bmp085-i2c.c')
0 files changed, 0 insertions, 0 deletions