pinctrl: pinctrl-single: add debugfs pin h/w state info
authorMatt Porter <mporter@ti.com>
Wed, 26 Sep 2012 19:07:43 +0000 (15:07 -0400)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 28 Sep 2012 07:12:53 +0000 (09:12 +0200)
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>
drivers/pinctrl/pinctrl-single.c

index aabecfa507b4f77d69922079ec4d696577c3e413..726a729a2ec92d5d0ae5e45e94bd458305496219 100644 (file)
@@ -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,