Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: qcom: print egpio mode in debugfs

When egpio_enable bit is cleared, the gpio is driven by SSC/LPASS TLMM and
the APSS TLMM settings are ignored. Reflect that in the debugfs dump.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Link: https://lore.kernel.org/r/20220210131210.24605-2-jonathan@marek.ca
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Jonathan Marek and committed by
Linus Walleij
06e12b79 c74803ee

+9
+9
drivers/pinctrl/qcom/pinctrl-msm.c
··· 615 615 int drive; 616 616 int pull; 617 617 int val; 618 + int egpio_enable; 618 619 u32 ctl_reg, io_reg; 619 620 620 621 static const char * const pulls_keeper[] = { ··· 642 641 func = (ctl_reg >> g->mux_bit) & 7; 643 642 drive = (ctl_reg >> g->drv_bit) & 7; 644 643 pull = (ctl_reg >> g->pull_bit) & 3; 644 + egpio_enable = 0; 645 + if (pctrl->soc->egpio_func && ctl_reg & BIT(g->egpio_present)) 646 + egpio_enable = !(ctl_reg & BIT(g->egpio_enable)); 645 647 646 648 if (is_out) 647 649 val = !!(io_reg & BIT(g->out_bit)); 648 650 else 649 651 val = !!(io_reg & BIT(g->in_bit)); 652 + 653 + if (egpio_enable) { 654 + seq_printf(s, " %-8s: egpio\n", g->name); 655 + return; 656 + } 650 657 651 658 seq_printf(s, " %-8s: %-3s", g->name, is_out ? "out" : "in"); 652 659 seq_printf(s, " %-4s func%d", val ? "high" : "low", func);