]> asedeno.scripts.mit.edu Git - linux.git/commit
pinctrl/gpio: Take MUX usage into account
authorStefan Wahren <stefan.wahren@i2se.com>
Wed, 14 Aug 2019 11:00:35 +0000 (14:00 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 23 Aug 2019 09:09:41 +0000 (11:09 +0200)
commit472a61e777fe78cdcb6cb6f25efee0ae9f629aca
treef3ee044b2383fa012881daf257e6b4ca90ceefd4
parent2dc889a8846d16574794669bbdca7401900695b7
pinctrl/gpio: Take MUX usage into account

The user space like gpioinfo only see the GPIO usage but not the
MUX usage (e.g. I2C or SPI usage) of a pin. As a user we want
to know which pin is free/safe to use. So take the MUX usage of
strict pinmux controllers into account to get a more realistic
view for ioctl GPIO_GET_LINEINFO_IOCTL.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
Link: https://lore.kernel.org/r/20190814110035.13451-1-ramon.fried@linux.intel.com
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
drivers/pinctrl/core.c
drivers/pinctrl/pinmux.c
drivers/pinctrl/pinmux.h
include/linux/pinctrl/consumer.h