[PATCH] pinctrl: pinctrl-single: Fix the pins debug output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---

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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux