summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-single.c
diff options
context:
space:
mode:
authorMatt Porter <mporter@ti.com>2012-09-26 15:07:43 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-09-28 09:12:53 +0200
commit7d66ce7f8cf4df01a39a5abad4769df23ff59b8a (patch)
tree078d28a81aed4b51ae3e9941b8ec881d7364f2bd /drivers/pinctrl/pinctrl-single.c
parent4401e2989b5dc5e8e7dedc5a1dec710247f3bb35 (diff)
pinctrl: pinctrl-single: add debugfs pin h/w state info
Adds support for displaying the individual pin h/w config state. Signed-off-by: Matt Porter <mporter@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r--drivers/pinctrl/pinctrl-single.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index aabecfa507b..726a729a2ec 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -246,7 +246,15 @@ static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev,
struct seq_file *s,
unsigned offset)
{
- seq_printf(s, " " DRIVER_NAME);
+ struct pcs_device *pcs;
+ unsigned val;
+
+ pcs = pinctrl_dev_get_drvdata(pctldev);
+
+ val = pcs->read(pcs->base + offset);
+ val &= pcs->fmask;
+
+ seq_printf(s, "%08x %s " , val, DRIVER_NAME);
}
static void pcs_dt_free_map(struct pinctrl_dev *pctldev,