summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-11-13 16:35:44 +0530
committerLaxman Dewangan <ldewangan@nvidia.com>2013-11-13 22:17:01 -0800
commita2a6901c543740c7957898f67d4838eddd097a40 (patch)
tree571e8aadc76b38fb2b3772fec98a200364aba522 /drivers/pinctrl
parent88fcc712f6ad20b6c0927af5dc60643f377b27cd (diff)
pinctrl: tegra: fix the debugfs pinmux dump
Change-Id: Ib0876549714964fba925b34da272488fc997329d Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/330357 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-tegra.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index 5db0ae102996..8b71910bb3af 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -1867,10 +1867,10 @@ static int dbg_pinmux_show(struct seq_file *s, void *unused)
if (!pmx->soc->groups[i].name)
continue;
- if (pmx->soc->groups[i].drv_reg < 0)
+ if (pmx->soc->groups[i].mux_reg < 0)
continue;
- seq_printf(s, "\t{TEGRA_PINGROUP_%s", pmx->soc->groups[i].name);
+ seq_printf(s, "\t{%s", pmx->soc->groups[i].name);
len = strlen(pmx->soc->groups[i].name);
dbg_pad_field(s, 15 - len);
@@ -2049,10 +2049,9 @@ static int dbg_drive_pinmux_show(struct seq_file *s, void *unused)
if (pmx->soc->groups[i].drv_reg < 0)
continue;
- seq_printf(s, "\t{TEGRA_DRIVE_PINGROUP_%s",
- pmx->soc->groups[i].name);
+ seq_printf(s, "\t{%s", pmx->soc->groups[i].name);
len = strlen(pmx->soc->groups[i].name);
- dbg_pad_field(s, 7 - len);
+ dbg_pad_field(s, 15 - len);
reg = pmx_readl(pmx, pmx->soc->groups[i].drv_bank,
@@ -2116,6 +2115,9 @@ static const struct file_operations debug_drive_fops = {
static int __init tegra_pinctrl_debuginit(void)
{
+ if (!pmx)
+ return 0;
+
(void) debugfs_create_file("tegra_pinctrl", S_IRUGO | S_IWUGO,
NULL, NULL, &debug_fops);
(void) debugfs_create_file("tegra_pinctrl_drive", S_IRUGO,