aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2013-10-09 21:41:35 -0400
committerMark Brown <broonie@linaro.org>2013-10-24 06:11:14 -0400
commit033054e8603036e43ddfad3155b3e5b78ed49e04 (patch)
treef14de12ee917ddd1629bcdf381ff2bc4824293bb /drivers/regulator
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
regulator: s5m8767: Modify parse_dt function to parse data related to ramp
This patch parse 'buck[2-4]_ramp_enable and buck_ramp_delay' platform data from dts file. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/s5m8767.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index c24448bc43cf..cb6cdb3c0bdc 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -640,6 +640,22 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
640 return -EINVAL; 640 return -EINVAL;
641 } 641 }
642 642
643 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
644 pdata->buck2_ramp_enable = true;
645
646 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
647 pdata->buck3_ramp_enable = true;
648
649 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
650 pdata->buck4_ramp_enable = true;
651
652 if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
653 || pdata->buck4_ramp_enable) {
654 if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
655 &pdata->buck_ramp_delay))
656 pdata->buck_ramp_delay = 0;
657 }
658
643 return 0; 659 return 0;
644} 660}
645#else 661#else