diff options
author | Light Hsieh <light.hsieh@mediatek.com> | 2020-01-22 14:53:11 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-02-14 11:31:18 +0100 |
commit | 3599cc525486be6681640ff3083376c001264c61 (patch) | |
tree | f512a3f3f3d73f8bd824e85ee27d2c2a8af38a45 /drivers/reset/reset-ath79.c | |
parent | 5f755e1f1efe5ca3b475b14169e6e85bf1411bb5 (diff) |
pinctrl: mediatek: Refine mtk_pinconf_get() and mtk_pinconf_set()
1.Refine mtk_pinconf_get():
Use only one occurrence of return at end of this function.
2.Refine mtk_pinconf_set():
2.1 Use only one occurrence of return at end of this function.
2.2 Modify case of PIN_CONFIG_INPUT_ENABLE -
2.2.1
Regard all non-zero setting value as enable, instead of always enable.
2.2.2
Remove check of ies_present flag and always invoke mtk_hw_set_value()
since mtk_hw_pin_field_lookup() invoked inside mtk_hw_set_value() has
the same effect of checking if ies control is supported.
[The rationale is that: available of a control is always checked
in mtk_hw_pin_field_lookup() and no need to add ies_present flag
specially for ies control.]
2.3 Simply code logic for case of PIN_CONFIG_INPUT_SCHMITT.
2.4 Add case for PIN_CONFIG_INPUT_SCHMITT_ENABLE and process it with the
same code for case of PIN_CONFIG_INPUT_SCHMITT.
Signed-off-by: Light Hsieh <light.hsieh@mediatek.com>
Link: https://lore.kernel.org/r/1579675994-7001-3-git-send-email-light.hsieh@mediatek.com
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/reset/reset-ath79.c')
0 files changed, 0 insertions, 0 deletions