All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benoit Cousson <b-cousson@ti.com>
To: "tony@atomide.com" <tony@atomide.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"hilman >> Kevin Hilman" <khilman@ti.com>
Subject: [PATCH] pinctrl: pinctrl-single: Fix the pins debug output
Date: Thu, 8 Nov 2012 18:44:00 +0100	[thread overview]
Message-ID: <509BEF60.1030805@ti.com> (raw)

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

             reply	other threads:[~2012-11-08 17:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-08 17:44 Benoit Cousson [this message]
2012-11-08 17:58 ` [PATCH] pinctrl: pinctrl-single: Fix the pins debug output Tony Lindgren

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=509BEF60.1030805@ti.com \
    --to=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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.