summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoody Lin <woody_lin@htc.com>2017-02-06 14:31:03 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-12-23 23:43:34 +0200
commit2402e1b97f9333cdd985f14810ae764ba7335342 (patch)
treeb876ff13a708ccb1daede9184cfb57b9bd8cf84e
parentcfaa1d1bd77780cd31c8d51ba9f2365c34c6a752 (diff)
pinctrl/qcom: pinctrl-msm.c: Bypass GPIO pins owned by TZ
Accessing pins owned by TZ crashes the system. Avoid to access these pins in msm_gpio_dbg_show so that we can cat "/d/gpio" to monitor pin states without crash. Bug: 34906817 Change-Id: Ib5347dee882299361094e31cfb7950b65716e654 Signed-off-by: Woody Lin <woody_lin@htc.com>
-rw-r--r--drivers/pinctrl/qcom/pinctrl-msm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 2db0a54eeb8f..9cbd2ab13877 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -504,6 +504,10 @@ static void msm_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
unsigned i;
for (i = 0; i < chip->ngpio; i++, gpio++) {
+ /* Bypass GPIO pins owned by TZ */
+ switch (gpio)
+ case 81 ... 84: continue;
+
msm_gpio_dbg_show_one(s, NULL, chip, i, gpio);
seq_puts(s, "\n");
}