Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+16
+15
drivers/pinctrl/cix/pinctrl-sky1-base.c
··· 560 560 return ret; 561 561 } 562 562 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 + 563 578 dev_dbg(&pdev->dev, "initialized SKY1 pinctrl driver\n"); 564 579 565 580 return pinctrl_enable(spctl->pctl);
+1
drivers/pinctrl/core.c
··· 70 70 { 71 71 pinctrl_dummy_state = true; 72 72 } 73 + EXPORT_SYMBOL_GPL(pinctrl_provide_dummies); 73 74 74 75 const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev) 75 76 {