devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: s5m8767: Modify parse_dt function to parse data related to ramp
@ 2013-10-10  1:41 Chanwoo Choi
       [not found] ` <1381369296-17101-1-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Chanwoo Choi @ 2013-10-10  1:41 UTC (permalink / raw)
  To: broonie, lgirdwood, sbkim73
  Cc: linux-kernel, devicetree, Chanwoo Choi, Kyungmin Park

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>
---
 drivers/regulator/s5m8767.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index c24448b..cb6cdb3 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,
 		return -EINVAL;
 	}
 
+	if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
+		pdata->buck2_ramp_enable = true;
+
+	if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
+		pdata->buck3_ramp_enable = true;
+
+	if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
+		pdata->buck4_ramp_enable = true;
+
+	if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
+			|| pdata->buck4_ramp_enable) {
+		if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
+				&pdata->buck_ramp_delay))
+			pdata->buck_ramp_delay = 0;
+	}
+
 	return 0;
 }
 #else
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-10-25  9:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10  1:41 [PATCH 1/2] regulator: s5m8767: Modify parse_dt function to parse data related to ramp Chanwoo Choi
     [not found] ` <1381369296-17101-1-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-10  1:41   ` [PATCH 2/2] regulator: s5m8767: Modify parsing method of the voltage table of buck2/3/4 Chanwoo Choi
     [not found]     ` <1381369296-17101-2-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-10 10:36       ` Mark Rutland
2013-10-10 11:46         ` Chanwoo Choi
2013-10-10 10:28 ` [PATCH 1/2] regulator: s5m8767: Modify parse_dt function to parse data related to ramp Mark Rutland
     [not found]   ` <20131010102826.GG26954-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-10-10 11:10     ` Chanwoo Choi
2013-10-10 16:51       ` Mark Rutland
2013-10-10 17:36         ` Mark Brown
2013-10-24 10:15 ` Mark Brown
2013-10-25  9:08   ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).