pinctrl: qcom: Add egpio feature support
authorPrasad Sodagudi <psodagud@codeaurora.org>
Tue, 16 Nov 2021 05:38:03 +0000 (11:08 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 21 Nov 2021 23:27:54 +0000 (00:27 +0100)
commitbebc49c1e5f64641831758d72a26a8dd2c61d38a
tree35e30a0fea912f8f5d02361baf81ba5f979945e4
parentf347438356e1c69799b21bed7dc8654f58124592
pinctrl: qcom: Add egpio feature support

egpio is a scheme which allows special power Island Domain IOs
(LPASS,SSC) to be reused as regular chip GPIOs by muxing regular
TLMM functions with Island Domain functions.
With this scheme, an IO can be controlled both by the cpu running
linux and the Island processor. This provides great flexibility to
re-purpose the Island IOs for regular TLMM usecases.

2 new bits are added to ctl_reg, egpio_present is a read only bit
which shows if egpio feature is available or not on a given gpio.
egpio_enable is the read/write bit and only effective if egpio_present
is 1. Once its set, the Island IO is controlled from Chip TLMM.
egpio_enable when set to 0 means the GPIO is used as Island Domain IO.

To support this we add a new function 'egpio' which can be used to
set the egpio_enable to 0, for any other TLMM controlled functions
we set the egpio_enable to 1.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Link: https://lore.kernel.org/r/1637041084-3299-1-git-send-email-rnayak@codeaurora.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-msm.c
drivers/pinctrl/qcom/pinctrl-msm.h