pinctrl: pinctrl-msm: do not dump unallocated GPIOs

Do not dump GPIOS that are not allocated by HLOS. This is a temporary
change to avoid TZ exceptions.

Change-Id: I7b231457d186cbdc0a900b153bc8b09e9ccffddd
Signed-off-by: Dmitry Ornatsky <cdo021c@motorola.com>
Reviewed-on: http://gerrit.mot.com/808904
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-on: https://gerrit.mot.com/1230533
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaopeng Li <lixp5@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1400180
Reviewed-on: https://gerrit.mot.com/1436604
Reviewed-on: https://gerrit.mot.com/1509717
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
This commit is contained in:
Dmitry Ornatsky authored and Gilberto Gambugge committed 2023-06-01 00:47:05 -03:00
1 parent c0bbf0b613
commit 4c8d2afa68
1 file changed
+5
+5
View File
@@ -542,6 +542,11 @@ static void msm_gpio_dbg_show_one(struct seq_file *s,
if (!gpiochip_line_is_valid(chip, offset))
return;
if (!gpiochip_is_requested(chip, offset)) {
seq_printf(s, " gpio%d: is not allocated in gpiolib\n", offset);
return;
}
g = &pctrl->soc->groups[offset];
ctl_reg = readl(pctrl->regs + g->ctl_reg);
io_reg = readl(pctrl->regs + g->io_reg);