pinctrl: qcom: Don't allow protected pins to be requested
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 23 Mar 2018 16:34:53 +0000 (09:34 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 27 Mar 2018 13:34:25 +0000 (15:34 +0200)
commit691bf5d5a7bfedc60b7218f4d9b915bf356df767
tree074506c16494fc907fb4e5e9e194e8876ad69f27
parent726cb3ba49692bdae6caff457755e7cdb432efa4
pinctrl: qcom: Don't allow protected pins to be requested

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 and
reset the device. With a DT/ACPI property to describe the set of
pins that are available for use, parse the available pins and set
the irq valid bits for gpiolib to know what to consider 'valid'.
This should avoid any issues with gpiolib. Furthermore, implement
the pinmux_ops::request function so that pinmux can also make
sure to not use pins that are unavailable.

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/pinctrl/qcom/pinctrl-msm.c