summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/pinctrl/sh-pfc
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/pinctrl/sh-pfc')
-rw-r--r--kernel/drivers/pinctrl/sh-pfc/core.c4
-rw-r--r--kernel/drivers/pinctrl/sh-pfc/pinctrl.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/kernel/drivers/pinctrl/sh-pfc/core.c b/kernel/drivers/pinctrl/sh-pfc/core.c
index 181ea98a6..2b0d70217 100644
--- a/kernel/drivers/pinctrl/sh-pfc/core.c
+++ b/kernel/drivers/pinctrl/sh-pfc/core.c
@@ -545,7 +545,9 @@ static int sh_pfc_probe(struct platform_device *pdev)
return ret;
}
- pinctrl_provide_dummies();
+ /* Enable dummy states for those platforms without pinctrl support */
+ if (!of_have_populated_dt())
+ pinctrl_provide_dummies();
ret = sh_pfc_init_ranges(pfc);
if (ret < 0)
diff --git a/kernel/drivers/pinctrl/sh-pfc/pinctrl.c b/kernel/drivers/pinctrl/sh-pfc/pinctrl.c
index 863c3e30c..50f2014fe 100644
--- a/kernel/drivers/pinctrl/sh-pfc/pinctrl.c
+++ b/kernel/drivers/pinctrl/sh-pfc/pinctrl.c
@@ -483,7 +483,8 @@ static bool sh_pfc_pinconf_validate(struct sh_pfc *pfc, unsigned int _pin,
switch (param) {
case PIN_CONFIG_BIAS_DISABLE:
- return true;
+ return pin->configs &
+ (SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN);
case PIN_CONFIG_BIAS_PULL_UP:
return pin->configs & SH_PFC_PIN_CFG_PULL_UP;