Skip to content

Commit

Permalink
pinctrl: single: dump pinmux register value
Browse files Browse the repository at this point in the history
Dump pinmux register value, not only function part in the pinmux
register.

Also fix the issue on caluclating pin offset. The last parameter
should be pin number, not register offset.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Haojian Zhuang authored and Linus Walleij committed Nov 15, 2012
1 parent f92bc45 commit e7ed671
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/pinctrl/pinctrl-single.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ static int pcs_get_group_pins(struct pinctrl_dev *pctldev,

static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev,
struct seq_file *s,
unsigned offset)
unsigned pin)
{
struct pcs_device *pcs;
unsigned val;
unsigned val, mux_bytes;

pcs = pinctrl_dev_get_drvdata(pctldev);

val = pcs->read(pcs->base + offset);
val &= pcs->fmask;
mux_bytes = pcs->width / BITS_PER_BYTE;
val = pcs->read(pcs->base + pin * mux_bytes);

seq_printf(s, "%08x %s " , val, DRIVER_NAME);
}
Expand Down

0 comments on commit e7ed671

Please sign in to comment.