aboutsummaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-samsung.c
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-05-17 18:24:30 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-05-27 15:37:08 +0200
commit21c219933fd123d4cdfc8853f51c41330b9d6c28 (patch)
tree41ca59025b0637967c419c17421b89200c298346 /drivers/pinctrl/pinctrl-samsung.c
parent97fc463769f1564e8eda2e2f70d3b6e92a25ff16 (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/pinctrl-samsung.c')
-rw-r--r--drivers/pinctrl/pinctrl-samsung.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
index 15db2580c14..63ac22e8967 100644
--- a/drivers/pinctrl/pinctrl-samsung.c
+++ b/drivers/pinctrl/pinctrl-samsung.c
@@ -1010,6 +1010,9 @@ static void samsung_pinctrl_suspend_dev(
reg, bank->pm_save[PINCFG_TYPE_FUNC]);
}
}
+
+ if (ctrl->suspend)
+ ctrl->suspend(drvdata);
}
/**
@@ -1026,6 +1029,9 @@ static void samsung_pinctrl_resume_dev(struct samsung_pinctrl_drv_data *drvdata)
void __iomem *virt_base = drvdata->virt_base;
int i;
+ if (ctrl->resume)
+ ctrl->resume(drvdata);
+
for (i = 0; i < ctrl->nr_banks; i++) {
struct samsung_pin_bank *bank = &ctrl->pin_banks[i];
void __iomem *reg = virt_base + bank->pctl_offset;