pinctrl: samsung: Define suspend and resume callbacks for all banks and SoCs
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 23 Jul 2018 17:52:53 +0000 (19:52 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Tue, 24 Jul 2018 19:35:54 +0000 (21:35 +0200)
Suspend and resume callbacks in Exynos/S5Pv210 pin controller drivers,
save and restore state of registers.  This operations should be done for
all banks which have external interrupts (as denoted by using
EXYNOS_PIN_BANK_EINTG/EINTW macros).

Add all banks of Exynos5260 and Exynos5420.  This is necessary step for
supporting suspend to RAM on these SoCs.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Sylwester Nawrocki <snawrocki@kernel.org>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/pinctrl/samsung/pinctrl-exynos-arm.c

index d82820fc349a9c9ebd66b18bc223a036f8bbc55b..44c6b753f692ad9ce17faf68b3cc80eaeda27c51 100644 (file)
@@ -616,16 +616,22 @@ static const struct samsung_pin_ctrl exynos5260_pin_ctrl[] __initconst = {
                .nr_banks       = ARRAY_SIZE(exynos5260_pin_banks0),
                .eint_gpio_init = exynos_eint_gpio_init,
                .eint_wkup_init = exynos_eint_wkup_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
        }, {
                /* pin-controller instance 1 data */
                .pin_banks      = exynos5260_pin_banks1,
                .nr_banks       = ARRAY_SIZE(exynos5260_pin_banks1),
                .eint_gpio_init = exynos_eint_gpio_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
        }, {
                /* pin-controller instance 2 data */
                .pin_banks      = exynos5260_pin_banks2,
                .nr_banks       = ARRAY_SIZE(exynos5260_pin_banks2),
                .eint_gpio_init = exynos_eint_gpio_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
        },
 };
 
@@ -842,30 +848,40 @@ static const struct samsung_pin_ctrl exynos5420_pin_ctrl[] __initconst = {
                .nr_banks       = ARRAY_SIZE(exynos5420_pin_banks0),
                .eint_gpio_init = exynos_eint_gpio_init,
                .eint_wkup_init = exynos_eint_wkup_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
                .retention_data = &exynos5420_retention_data,
        }, {
                /* pin-controller instance 1 data */
                .pin_banks      = exynos5420_pin_banks1,
                .nr_banks       = ARRAY_SIZE(exynos5420_pin_banks1),
                .eint_gpio_init = exynos_eint_gpio_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
                .retention_data = &exynos5420_retention_data,
        }, {
                /* pin-controller instance 2 data */
                .pin_banks      = exynos5420_pin_banks2,
                .nr_banks       = ARRAY_SIZE(exynos5420_pin_banks2),
                .eint_gpio_init = exynos_eint_gpio_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
                .retention_data = &exynos5420_retention_data,
        }, {
                /* pin-controller instance 3 data */
                .pin_banks      = exynos5420_pin_banks3,
                .nr_banks       = ARRAY_SIZE(exynos5420_pin_banks3),
                .eint_gpio_init = exynos_eint_gpio_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
                .retention_data = &exynos5420_retention_data,
        }, {
                /* pin-controller instance 4 data */
                .pin_banks      = exynos5420_pin_banks4,
                .nr_banks       = ARRAY_SIZE(exynos5420_pin_banks4),
                .eint_gpio_init = exynos_eint_gpio_init,
+               .suspend        = exynos_pinctrl_suspend,
+               .resume         = exynos_pinctrl_resume,
                .retention_data = &exynos4_audio_retention_data,
        },
 };