Skip to content

Commit 08f66a8

Browse files
wenslinusw
authored andcommitted
pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback
In the generic pin config library, readback of some options are handled differently compared to the setting of those options: the argument value is used to convey enable/disable of an option in the set path, but success or -EINVAL is used to convey if an option is enabled or disabled in the debugfs readback path. PIN_CONFIG_INPUT_SCHMITT_ENABLE is one such option. Fix the readback of the option in the mediatek-paris library, so that the debugfs dump is not showing "input schmitt enabled" for pins that don't have it enabled. Fixes: 1bea6af ("pinctrl: mediatek: Refine mtk_pinconf_get()") Signed-off-by: Chen-Yu Tsai <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Message-ID: <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 5038a66 commit 08f66a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/pinctrl/mediatek/pinctrl-paris.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
193193
}
194194

195195
err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_SMT, &ret);
196+
if (!ret)
197+
err = -EINVAL;
196198
break;
197199
case PIN_CONFIG_DRIVE_STRENGTH:
198200
if (!hw->soc->drive_get)

0 commit comments

Comments
 (0)