[COMMON] pinctrl: samsung: clear pinctrl state to disable mux configuration
authorYoungmin Nam <youngmin.nam@samsung.com>
Thu, 30 Nov 2017 06:49:12 +0000 (15:49 +0900)
committerYoungmin Nam <youngmin.nam@samsung.com>
Thu, 17 May 2018 04:16:22 +0000 (13:16 +0900)
This patch clear pinctrl state before running pinctrl_force_sleep.
By clearing pinctrl state, we can avoid warning log in pinmux_disable_setting().

Change-Id: I08035b77064d8fc7690989ba1f58ef0f71029ec3
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/pinctrl/samsung/pinctrl-samsung.c

index 5f34ed87869557cb5a26f45be58d300412bcafb5..19b78025d7e0698dd6693ba2da3137fd459154ca 100644 (file)
@@ -1235,6 +1235,11 @@ static int __maybe_unused samsung_pinctrl_suspend(struct device *dev)
        if (!drvdata->suspend)
                return -EINVAL;
 
+       if (!IS_ERR(drvdata->pctl_dev->p)) {
+               /* This is ignore to disable mux configuration. */
+               drvdata->pctl_dev->p->state = NULL;
+       }
+
        ret = pinctrl_force_sleep(drvdata->pctl_dev);
        if (ret)
                dev_err(drvdata->dev, "could not set sleep pinstate %d\n", ret);