Skip to content

Commit 59d2d28

Browse files
author
Linus Walleij
committed
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>
1 parent 99224c1 commit 59d2d28

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

drivers/pinctrl/cix/pinctrl-sky1-base.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,21 @@ int sky1_base_pinctrl_probe(struct platform_device *pdev,
560560
return ret;
561561
}
562562

563+
/*
564+
* The SKY1 SoC has two pin controllers: one for normal working state
565+
* and one for sleep state. Since one controller only has working
566+
* states and the other only sleep states, it will seem to the
567+
* controller is always in the first configured state, so no
568+
* transitions between default->sleep->default are detected and no
569+
* new pin states are applied when we go in and out of sleep state.
570+
*
571+
* To counter this, provide dummies, so that the sleep-only pin
572+
* controller still get some default states, and the working state pin
573+
* controller get some sleep states, so that state transitions occur
574+
* and we re-configure pins for default and sleep states.
575+
*/
576+
pinctrl_provide_dummies();
577+
563578
dev_dbg(&pdev->dev, "initialized SKY1 pinctrl driver\n");
564579

565580
return pinctrl_enable(spctl->pctl);

drivers/pinctrl/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ void pinctrl_provide_dummies(void)
7070
{
7171
pinctrl_dummy_state = true;
7272
}
73+
EXPORT_SYMBOL_GPL(pinctrl_provide_dummies);
7374

7475
const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev)
7576
{

0 commit comments

Comments
 (0)