aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-single.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@gmail.com>2012-11-07 10:19:42 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-15 09:11:07 -0500
commite7ed671825d7d8ee7225a9e1de997d643e6d5d69 (patch)
tree4189ad5f0d2b87da7c08703511ed208c91eb43db /drivers/pinctrl/pinctrl-single.c
parentf92bc45ffdcd28c41bb6861753deb1a68d857922 (diff)
pinctrl: single: dump pinmux register value
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r--drivers/pinctrl/pinctrl-single.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 726a729a2ec9..145025f50086 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -244,15 +244,15 @@ static int pcs_get_group_pins(struct pinctrl_dev *pctldev,
244 244
245static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev, 245static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev,
246 struct seq_file *s, 246 struct seq_file *s,
247 unsigned offset) 247 unsigned pin)
248{ 248{
249 struct pcs_device *pcs; 249 struct pcs_device *pcs;
250 unsigned val; 250 unsigned val, mux_bytes;
251 251
252 pcs = pinctrl_dev_get_drvdata(pctldev); 252 pcs = pinctrl_dev_get_drvdata(pctldev);
253 253
254 val = pcs->read(pcs->base + offset); 254 mux_bytes = pcs->width / BITS_PER_BYTE;
255 val &= pcs->fmask; 255 val = pcs->read(pcs->base + pin * mux_bytes);
256 256
257 seq_printf(s, "%08x %s " , val, DRIVER_NAME); 257 seq_printf(s, "%08x %s " , val, DRIVER_NAME);
258} 258}