diff options
Diffstat (limited to 'drivers/regulator/s5m8767.c')
-rw-r--r-- | drivers/regulator/s5m8767.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index 754c6fcc6e64..bfc0e143bf40 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -605,7 +605,7 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, of_node_put(regulators_np); - if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) { + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs")) { pdata->buck2_gpiodvs = true; if (of_property_read_u32_array(pmic_np, @@ -616,7 +616,7 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, } } - if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) { + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs")) { pdata->buck3_gpiodvs = true; if (of_property_read_u32_array(pmic_np, @@ -627,7 +627,7 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, } } - if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) { + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs")) { pdata->buck4_gpiodvs = true; if (of_property_read_u32_array(pmic_np, @@ -661,14 +661,9 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, if (ret) 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; + pdata->buck2_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck2-ramp-enable"); + pdata->buck3_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck3-ramp-enable"); + pdata->buck4_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck4-ramp-enable"); if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable || pdata->buck4_ramp_enable) { @@ -1004,6 +999,7 @@ MODULE_DEVICE_TABLE(platform, s5m8767_pmic_id); static struct platform_driver s5m8767_pmic_driver = { .driver = { .name = "s5m8767-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = s5m8767_pmic_probe, .id_table = s5m8767_pmic_id, |