diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2025-11-04 14:01:03 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2025-11-05 18:13:33 +0100 |
| commit | 59d2d28f2269dfb89d64828fd330bc32113fd036 (patch) | |
| tree | 87cace7a8341338575b74b7f5408f898ab70dc41 | |
| parent | 99224c151c19b74e1930d236dd348b6b22a607a5 (diff) | |
pinctrl: cix: sky1: Provide pin control dummy states
This exports and calls the pinctrl_provide_dummies() function from
the CIX SKY1 driver.
The reasons are explained in a comment in the commit, in essence the
two pin controllers need to go through explicit state transitions
default->sleep->default despite they only handle one single state
each.
Reviewed-by: Hans Zhang <hans.zhang@cixtech.com>
Reviewed-by: Fugang Duan <fugang.duan@cixtech.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| -rw-r--r-- | drivers/pinctrl/cix/pinctrl-sky1-base.c | 15 | ||||
| -rw-r--r-- | drivers/pinctrl/core.c | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pinctrl/cix/pinctrl-sky1-base.c b/drivers/pinctrl/cix/pinctrl-sky1-base.c index b03e10147b09..a5b583f10441 100644 --- a/drivers/pinctrl/cix/pinctrl-sky1-base.c +++ b/drivers/pinctrl/cix/pinctrl-sky1-base.c @@ -560,6 +560,21 @@ int sky1_base_pinctrl_probe(struct platform_device *pdev, return ret; } + /* + * The SKY1 SoC has two pin controllers: one for normal working state + * and one for sleep state. Since one controller only has working + * states and the other only sleep states, it will seem to the + * controller is always in the first configured state, so no + * transitions between default->sleep->default are detected and no + * new pin states are applied when we go in and out of sleep state. + * + * To counter this, provide dummies, so that the sleep-only pin + * controller still get some default states, and the working state pin + * controller get some sleep states, so that state transitions occur + * and we re-configure pins for default and sleep states. + */ + pinctrl_provide_dummies(); + dev_dbg(&pdev->dev, "initialized SKY1 pinctrl driver\n"); return pinctrl_enable(spctl->pctl); diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 157510157d47..83254a95ef17 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -70,6 +70,7 @@ void pinctrl_provide_dummies(void) { pinctrl_dummy_state = true; } +EXPORT_SYMBOL_GPL(pinctrl_provide_dummies); const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev) { |
