[5/5] pinctrl: imx: fix debug message for SHARE_MUX_CONF_REG case
diff mbox

Message ID 1494592686-30967-7-git-send-email-aisheng.dong@nxp.com
State New
Headers show

Commit Message

Aisheng Dong May 12, 2017, 12:38 p.m. UTC
The original implemented debug message does not work for
SHARE_MUX_CONF_REG case. This patch fixes it.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Fixes: bf5a530971af ("pinctrl: imx: add VF610 support to imx pinctrl framework")
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/pinctrl/freescale/pinctrl-imx.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Shawn Guo May 15, 2017, 12:05 p.m. UTC | #1
On Fri, May 12, 2017 at 08:38:06PM +0800, Dong Aisheng wrote:
> The original implemented debug message does not work for
> SHARE_MUX_CONF_REG case. This patch fixes it.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Fixes: bf5a530971af ("pinctrl: imx: add VF610 support to imx pinctrl framework")
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

Fixes should go first in a patch series.

Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Aisheng Dong May 15, 2017, 12:08 p.m. UTC | #2
> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo@kernel.org]
> Sent: Monday, May 15, 2017 8:06 PM
> To: A.S. Dong
> Cc: linux-gpio@vger.kernel.org; Andy Duan; Jacky Bai;
> linus.walleij@linaro.org; stefan@agner.ch; kernel@pengutronix.de; linux-
> arm-kernel@lists.infradead.org
> Subject: Re: [PATCH 5/5] pinctrl: imx: fix debug message for
> SHARE_MUX_CONF_REG case
> 
> On Fri, May 12, 2017 at 08:38:06PM +0800, Dong Aisheng wrote:
> > The original implemented debug message does not work for
> > SHARE_MUX_CONF_REG case. This patch fixes it.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Fixes: bf5a530971af ("pinctrl: imx: add VF610 support to imx pinctrl
> > framework")
> > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> 
> Fixes should go first in a patch series.
> 

That's true.
Thanks for the suggestion.

Regards
Dong Aisheng

> Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 8347197..57e1f7a 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -200,11 +200,13 @@  static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
 			reg &= ~info->mux_mask;
 			reg |= (pin->mux_mode << info->mux_shift);
 			writel(reg, ipctl->base + pin_reg->mux_reg);
+			dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n",
+				pin_reg->mux_reg, reg);
 		} else {
 			writel(pin->mux_mode, ipctl->base + pin_reg->mux_reg);
+			dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n",
+				pin_reg->mux_reg, pin->mux_mode);
 		}
-		dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n",
-			pin_reg->mux_reg, pin->mux_mode);
 
 		/*
 		 * If the select input value begins with 0xff, it's a quirky
@@ -462,11 +464,13 @@  static int imx_pinconf_set(struct pinctrl_dev *pctldev,
 			reg &= info->mux_mask;
 			reg |= configs[i];
 			writel(reg, ipctl->base + pin_reg->conf_reg);
+			dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n",
+				pin_reg->conf_reg, reg);
 		} else {
 			writel(configs[i], ipctl->base + pin_reg->conf_reg);
+			dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%lx\n",
+				pin_reg->conf_reg, configs[i]);
 		}
-		dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%lx\n",
-			pin_reg->conf_reg, configs[i]);
 	} /* for each config */
 
 	return 0;