Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7eb5dcb1 authored by Kaushal Kumar's avatar Kaushal Kumar
Browse files

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: default avatarKaushal Kumar <kaushalk@codeaurora.org>
parent fe388ba1
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;
	};