* [PATCH] pinctrl: pinctrl-single: Fix the pins debug output
@ 2012-11-08 17:44 Benoit Cousson
2012-11-08 17:58 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Benoit Cousson @ 2012-11-08 17:44 UTC (permalink / raw)
To: tony@atomide.com, Linus Walleij
Cc: linux-omap@vger.kernel.org, hilman >> Kevin Hilman
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
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: pinctrl-single: Fix the pins debug output
2012-11-08 17:44 [PATCH] pinctrl: pinctrl-single: Fix the pins debug output Benoit Cousson
@ 2012-11-08 17:58 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2012-11-08 17:58 UTC (permalink / raw)
To: Benoit Cousson
Cc: Linus Walleij, linux-omap@vger.kernel.org, Kevin Hilman,
Matt Porter
* 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-08 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 17:44 [PATCH] pinctrl: pinctrl-single: Fix the pins debug output Benoit Cousson
2012-11-08 17:58 ` Tony Lindgren
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.