From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 9/9] pinctrl: single: dump pinmux register value
Date: Mon, 22 Oct 2012 15:27:44 -0700 [thread overview]
Message-ID: <20121022222744.GM4730@atomide.com> (raw)
In-Reply-To: <1350922139-3693-10-git-send-email-haojian.zhuang@gmail.com>
* Haojian Zhuang <haojian.zhuang@gmail.com> [121022 09:13]:
> Dump pinmux register value, not only function part in the pinmux
> register.
This makes sense, but should be done using pcs_read, not pcs_readl,
see below.
> 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>
> ---
> drivers/pinctrl/pinctrl-single.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index a20da78..6ba2a5d 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -284,15 +284,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_readl(pcs->base + pin * mux_bytes);
>
> seq_printf(s, "%08x %s " , val, DRIVER_NAME);
> }
You should not use pcs_readl here directly as the register
width can vary. Can you please update the patch for that and
make it independent from the rest of the series? That way we
can merge the fix for v3.7-rc series.
Regards,
Tony
prev parent reply other threads:[~2012-10-22 22:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 16:08 [PATCH v2 0/9] support pinctrl single in arch pxa/mmp Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 1/9] ARM: mmp: select pinctrl driver Haojian Zhuang
2012-10-23 10:05 ` Linus Walleij
2012-10-22 16:08 ` [PATCH v2 2/9] pinctrl: single: support gpio request and free Haojian Zhuang
2012-10-22 20:28 ` Tony Lindgren
2012-10-22 21:37 ` Tony Lindgren
2012-10-29 1:55 ` Haojian Zhuang
2012-10-29 1:58 ` Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 3/9] pinctrl: single: support pinconf generic Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 4/9] ARM: dts: support pinctrl single in pxa910 Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 5/9] document: devicetree: bind pinconf with pin-single Haojian Zhuang
2012-10-22 22:44 ` Stephen Warren
2012-10-31 16:58 ` Haojian Zhuang
2012-10-31 22:26 ` Stephen Warren
2012-10-31 22:51 ` Haojian Zhuang
2012-11-01 0:25 ` Tony Lindgren
2012-10-22 16:08 ` [PATCH v2 6/9] tty: pxa: configure pin Haojian Zhuang
2012-10-23 10:07 ` Linus Walleij
2012-10-22 16:08 ` [PATCH v2 7/9] i2c: pxa: use devm_kzalloc Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 8/9] i2c: pxa: configure pinmux Haojian Zhuang
2012-10-23 10:07 ` Linus Walleij
2012-10-22 16:08 ` [PATCH v2 9/9] pinctrl: single: dump pinmux register value Haojian Zhuang
2012-10-22 22:27 ` Tony Lindgren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121022222744.GM4730@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).