From: Tony Lindgren <tony@atomide.com>
To: Benoit Cousson <b-cousson@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Kevin Hilman <khilman@ti.com>, Matt Porter <mporter@ti.com>
Subject: Re: [PATCH] pinctrl: pinctrl-single: Fix the pins debug output
Date: Thu, 8 Nov 2012 09:58:37 -0800 [thread overview]
Message-ID: <20121108175836.GF6801@atomide.com> (raw)
In-Reply-To: <509BEF60.1030805@ti.com>
* Benoit Cousson <b-cousson@ti.com> [121108 09:46]:
> The offset parameter is in fact the pin index. The printed
> value is then most of the time wrong.
> Multiply that value by the width to get the proper offset.
>
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> ---
>
> Hi Tony,
>
> I guess that should probably go for 3.7-rc.
>
> Regards,
> Benoit
There is a similar patch already posted by Haojian at:
http://www.spinics.net/lists/arm-kernel/msg205682.html
Linus' take was that by definition a debug output fix
is not a fix, so not for the -rc cycle.
Haojian is adding support for pinconf, so let's use his
version as it also removes the fmask allowing it to
show the whole register.
Regards,
Tony
> drivers/pinctrl/pinctrl-single.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index 726a729..aeca3bd 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -251,7 +251,7 @@ static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev,
>
> pcs = pinctrl_dev_get_drvdata(pctldev);
>
> - val = pcs->read(pcs->base + offset);
> + val = pcs->read(pcs->base + offset * (pcs->width / BITS_PER_BYTE));
> val &= pcs->fmask;
>
> seq_printf(s, "%08x %s " , val, DRIVER_NAME);
> --
> 1.7.0.4
prev parent reply other threads:[~2012-11-08 17:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 17:44 [PATCH] pinctrl: pinctrl-single: Fix the pins debug output Benoit Cousson
2012-11-08 17:58 ` 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=20121108175836.GF6801@atomide.com \
--to=tony@atomide.com \
--cc=b-cousson@ti.com \
--cc=khilman@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-omap@vger.kernel.org \
--cc=mporter@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.