pinctrl: sh-pfc: Do not unconditionally support PIN_CONFIG_BIAS_DISABLE
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sat, 12 Nov 2016 16:04:24 +0000 (17:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:07 +0000 (14:04 +0200)
commit9cbef9a41d483fd988089ae1bf6b800a709d6635
tree96fa1e57434a16f7c4217b78cf52d78aa25c25ba
parenta5464db93860e420aede7804a9d65a38cc087e51
pinctrl: sh-pfc: Do not unconditionally support PIN_CONFIG_BIAS_DISABLE

commit 5d7400c4acbf7fe633a976a89ee845f7333de3e4 upstream.

Always stating PIN_CONFIG_BIAS_DISABLE is supported gives untrue output
when examining /sys/kernel/debug/pinctrl/e6060000.pfc/pinconf-pins if
the operation get_bias() is implemented but the pin is not handled by
the get_bias() implementation. In that case the output will state that
"input bias disabled" indicating that this pin has bias control
support.

Make support for PIN_CONFIG_BIAS_DISABLE depend on that the pin either
supports SH_PFC_PIN_CFG_PULL_UP or SH_PFC_PIN_CFG_PULL_DOWN. This also
solves the issue where SoC specific implementations print error messages
if their particular implementation of {set,get}_bias() is called with a
pin it does not know about.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/pinctrl/sh-pfc/pinctrl.c