gpiolib: Support 'gpio-reserved-ranges' property
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 23 Mar 2018 16:34:52 +0000 (09:34 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 27 Mar 2018 13:34:20 +0000 (15:34 +0200)
commit726cb3ba49692bdae6caff457755e7cdb432efa4
tree66bf4de79b830df2556fa8854dcba1d414ebd9a4
parentace56935ff48879239d79129c7882ea2ff1b4804
gpiolib: Support 'gpio-reserved-ranges' property

Some qcom platforms make some GPIOs or pins unavailable for use by
non-secure operating systems, and thus reading or writing the registers
for those pins will cause access control issues. Add support for a DT
property to describe the set of GPIOs that are available for use so that
higher level OSes are able to know what pins to avoid reading/writing.
Non-DT platforms can add support by directly updating the
chip->valid_mask.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h