Skip to content

Commit

Permalink
pinctrl: lpc18xx: fix schmitt trigger setup
Browse files Browse the repository at this point in the history
The param_val variable is what determines if schmitt
trigger is enabled on a pin or not. A typo here mean
that schmitt trigger was always enabled for standard
and i2c pins.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
manabian authored and linusw committed Jul 20, 2015
1 parent 9571b25 commit 681ccdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pinctrl/pinctrl-lpc18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ static int lpc18xx_pconf_set_i2c0(struct pinctrl_dev *pctldev,
break;

case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
if (param)
if (param_val)
*reg &= ~(LPC18XX_SCU_I2C0_ZIF << shift);
else
*reg |= (LPC18XX_SCU_I2C0_ZIF << shift);
Expand Down Expand Up @@ -876,7 +876,7 @@ static int lpc18xx_pconf_set_pin(struct pinctrl_dev *pctldev,
break;

case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
if (param)
if (param_val)
*reg &= ~LPC18XX_SCU_PIN_ZIF;
else
*reg |= LPC18XX_SCU_PIN_ZIF;
Expand Down

0 comments on commit 681ccdc

Please sign in to comment.