From: Youngmin Nam Date: Thu, 30 Nov 2017 06:49:12 +0000 (+0900) Subject: [COMMON] pinctrl: samsung: clear pinctrl state to disable mux configuration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6b2a39881375519f42ddabaf10f678fd72354a2e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] pinctrl: samsung: clear pinctrl state to disable mux configuration 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 --- diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index 5f34ed878695..19b78025d7e0 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -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);