summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2015-01-23 18:16:54 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:49:50 +0900
commit5cde25b04caba81db9a2d3aa0a07ea7e260d77a3 (patch)
tree1df0f310fdb40737541c5ced25a6a402498a2a2b /drivers/regulator
parent93868d699e4111f6b960122430435c819147a218 (diff)
regulator: s2mps11: add shutdown function
This needs for poweroff on odroid xu3 board. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/s2mps11.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 8b978ad87cb3..6b8e8aebf3a3 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1082,6 +1082,13 @@ out:
return ret;
}
+static void s2mps11_pmic_shutdown(struct platform_device *pdev)
+{
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
+
+ regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_CTRL1, 0xff, 0x00);
+}
+
static const struct platform_device_id s2mps11_pmic_id[] = {
{ "s2mps11-pmic", S2MPS11X},
{ "s2mps13-pmic", S2MPS13X},
@@ -1096,6 +1103,7 @@ static struct platform_driver s2mps11_pmic_driver = {
.name = "s2mps11-pmic",
},
.probe = s2mps11_pmic_probe,
+ .shutdown = s2mps11_pmic_shutdown,
.id_table = s2mps11_pmic_id,
};