pinctrl: qcom: Add EGPIO feature support to pinctrl driver
Island IO can be assigned to Apps TLMM dynamically if that island is not using the pin for any connectivity. Add support for enabling EGPIO feature if the pin can support it. EGPIO_PRESENT bit shows if EGPIO feature is present or not for particular pin. Once EGPIO_ENABLE bit is set the pin is now controlled by Apps TLMM. When pinctrl properties are getting initialized by device driver framework, pin functions select would call to msm_pinmux_set_mux function to select pin function and enable EGPIO. Change-Id: I64514904096286f2a5df351880cd56d753f0658f Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
parent
d9f382896a
commit
49d73826d0
@ -45,6 +45,8 @@
|
||||
.mux_bit = 2, \
|
||||
.pull_bit = 0, \
|
||||
.drv_bit = 6, \
|
||||
.egpio_enable = 12, \
|
||||
.egpio_present = 11, \
|
||||
.oe_bit = 9, \
|
||||
.in_bit = 0, \
|
||||
.out_bit = 1, \
|
||||
|
@ -180,6 +180,10 @@ static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
val = msm_readl_ctl(pctrl, g);
|
||||
val &= ~mask;
|
||||
val |= i << g->mux_bit;
|
||||
/* Check if egpio present and enable that feature */
|
||||
if (val & BIT(g->egpio_present))
|
||||
val |= BIT(g->egpio_enable);
|
||||
|
||||
msm_writel_ctl(val, pctrl, g);
|
||||
|
||||
raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
|
@ -75,6 +75,8 @@ struct msm_pingroup {
|
||||
unsigned pull_bit:5;
|
||||
unsigned drv_bit:5;
|
||||
|
||||
unsigned egpio_enable:5;
|
||||
unsigned egpio_present:5;
|
||||
unsigned oe_bit:5;
|
||||
unsigned in_bit:5;
|
||||
unsigned out_bit:5;
|
||||
|
Loading…
Reference in New Issue
Block a user