pinctrl: msm: Add input enable support to tlmm

Add input enable support to tlmm. This support
is needed to achieve higher power savings by
configuring any unused pin as input and bias-pull-down.

CRs-Fixed: 668615
Change-Id: I1a3042c2b6a0d01c8014b75852c544227b00cbaa
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
This commit is contained in:
Kaushal Kumar 2014-05-20 20:27:50 +05:30
parent fe388ba133
commit 7eb5dcb1cd
1 changed files with 13 additions and 0 deletions

View File

@ -400,6 +400,19 @@ static int msm_tlmm_gp_cfg(uint pin_no, unsigned long *config,
data = inout_val_to_dir(inout_val);
}
break;
case PIN_CONFIG_INPUT_ENABLE:
mask = TLMM_GP_DIR_MASK;
shft = TLMM_GP_DIR_SHFT;
inout_reg = TLMM_GP_INOUT(pinfo, pin_no);
if (write) {
/* GPIO_IN (b0) of TLMM_GPIO_IN_OUT is read-only */
data = 0;
} else {
inout_val = readl_relaxed(inout_reg);
data = inout_val;
}
break;
default:
return -EINVAL;
};