diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-03-21 16:17:47 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-05-21 11:07:29 +0200 |
commit | f1074e7281a2e83b1cca7dee8f7005fbcc1f594e (patch) | |
tree | aa710aa4323d592295000f7c98123ae124466725 /drivers/pinctrl/sh-pfc/pinctrl.c | |
parent | bd79c92039f117a3e448b9ef042595497a5218a6 (diff) | |
download | linux-f1074e7281a2e83b1cca7dee8f7005fbcc1f594e.tar.gz linux-f1074e7281a2e83b1cca7dee8f7005fbcc1f594e.tar.bz2 linux-f1074e7281a2e83b1cca7dee8f7005fbcc1f594e.zip |
pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand
It is very common for a pin to support both pull-up and pull-down
functionality. Hence add a shorthand SH_PFC_PIN_CFG_PULL_UP_DOWN.
This not only reduces typing, but also avoids the need for several line
breaks, and makes many overly long lines shorter, improving
readability.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pinctrl.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pinctrl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index c97d2ba7677c..2824be4eb887 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c @@ -569,8 +569,7 @@ static bool sh_pfc_pinconf_validate(struct sh_pfc *pfc, unsigned int _pin, switch (param) { case PIN_CONFIG_BIAS_DISABLE: - return pin->configs & - (SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN); + return pin->configs & SH_PFC_PIN_CFG_PULL_UP_DOWN; case PIN_CONFIG_BIAS_PULL_UP: return pin->configs & SH_PFC_PIN_CFG_PULL_UP; |