aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index e1615614a184..c3975a04d1cd 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -293,7 +293,7 @@ static int mtk_pconf_set_pull_select(struct mtk_pinctrl *pctl,
293 unsigned int pin, bool enable, bool isup, unsigned int arg) 293 unsigned int pin, bool enable, bool isup, unsigned int arg)
294{ 294{
295 unsigned int bit; 295 unsigned int bit;
296 unsigned int reg_pullen, reg_pullsel; 296 unsigned int reg_pullen, reg_pullsel, r1r0;
297 int ret; 297 int ret;
298 298
299 /* Some pins' pull setting are very different, 299 /* Some pins' pull setting are very different,
@@ -301,8 +301,12 @@ static int mtk_pconf_set_pull_select(struct mtk_pinctrl *pctl,
301 * resistor bit, so we need this special handle. 301 * resistor bit, so we need this special handle.
302 */ 302 */
303 if (pctl->devdata->spec_pull_set) { 303 if (pctl->devdata->spec_pull_set) {
304 /* For special pins, bias-disable is set by R1R0,
305 * the parameter should be "MTK_PUPD_SET_R1R0_00".
306 */
307 r1r0 = enable ? arg : MTK_PUPD_SET_R1R0_00;
304 ret = pctl->devdata->spec_pull_set(mtk_get_regmap(pctl, pin), 308 ret = pctl->devdata->spec_pull_set(mtk_get_regmap(pctl, pin),
305 pin, pctl->devdata->port_align, isup, arg); 309 pin, pctl->devdata->port_align, isup, r1r0);
306 if (!ret) 310 if (!ret)
307 return 0; 311 return 0;
308 } 312 }