Skip to content

Commit

Permalink
pinctrl: pinctrl-single: add debugfs pin h/w state info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Porter authored and Linus Walleij committed Sep 28, 2012
1 parent 4401e29 commit 7d66ce7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/pinctrl/pinctrl-single.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7d66ce7

Please sign in to comment.