diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-05-17 12:24:30 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-27 09:37:08 -0400 |
commit | 21c219933fd123d4cdfc8853f51c41330b9d6c28 (patch) | |
tree | 41ca59025b0637967c419c17421b89200c298346 /drivers/pinctrl | |
parent | 97fc463769f1564e8eda2e2f70d3b6e92a25ff16 (diff) |
pinctrl: samsung: Add support for SoC-specific suspend/resume callbacks
SoC-specific driver might require additional save and restore of
registers. This patch adds pair of SoC-specific callbacks per pinctrl
device to account for this.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.c | 6 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index 15db2580c145..63ac22e89678 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c | |||
@@ -1010,6 +1010,9 @@ static void samsung_pinctrl_suspend_dev( | |||
1010 | reg, bank->pm_save[PINCFG_TYPE_FUNC]); | 1010 | reg, bank->pm_save[PINCFG_TYPE_FUNC]); |
1011 | } | 1011 | } |
1012 | } | 1012 | } |
1013 | |||
1014 | if (ctrl->suspend) | ||
1015 | ctrl->suspend(drvdata); | ||
1013 | } | 1016 | } |
1014 | 1017 | ||
1015 | /** | 1018 | /** |
@@ -1026,6 +1029,9 @@ static void samsung_pinctrl_resume_dev(struct samsung_pinctrl_drv_data *drvdata) | |||
1026 | void __iomem *virt_base = drvdata->virt_base; | 1029 | void __iomem *virt_base = drvdata->virt_base; |
1027 | int i; | 1030 | int i; |
1028 | 1031 | ||
1032 | if (ctrl->resume) | ||
1033 | ctrl->resume(drvdata); | ||
1034 | |||
1029 | for (i = 0; i < ctrl->nr_banks; i++) { | 1035 | for (i = 0; i < ctrl->nr_banks; i++) { |
1030 | struct samsung_pin_bank *bank = &ctrl->pin_banks[i]; | 1036 | struct samsung_pin_bank *bank = &ctrl->pin_banks[i]; |
1031 | void __iomem *reg = virt_base + bank->pctl_offset; | 1037 | void __iomem *reg = virt_base + bank->pctl_offset; |
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h index 9f5cc811b8cf..b316d9fe9b6b 100644 --- a/drivers/pinctrl/pinctrl-samsung.h +++ b/drivers/pinctrl/pinctrl-samsung.h | |||
@@ -187,6 +187,9 @@ struct samsung_pin_ctrl { | |||
187 | 187 | ||
188 | int (*eint_gpio_init)(struct samsung_pinctrl_drv_data *); | 188 | int (*eint_gpio_init)(struct samsung_pinctrl_drv_data *); |
189 | int (*eint_wkup_init)(struct samsung_pinctrl_drv_data *); | 189 | int (*eint_wkup_init)(struct samsung_pinctrl_drv_data *); |
190 | void (*suspend)(struct samsung_pinctrl_drv_data *); | ||
191 | void (*resume)(struct samsung_pinctrl_drv_data *); | ||
192 | |||
190 | char *label; | 193 | char *label; |
191 | }; | 194 | }; |
192 | 195 | ||