diff options
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 4f86f6cab620..c25c2ff48305 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Driver for Regulator part of Palmas PMIC Chips | 2 | * Driver for Regulator part of Palmas PMIC Chips |
3 | * | 3 | * |
4 | * Copyright 2011-2012 Texas Instruments Inc. | 4 | * Copyright 2011-2013 Texas Instruments Inc. |
5 | * | 5 | * |
6 | * Author: Graeme Gregory <gg@slimlogic.co.uk> | 6 | * Author: Graeme Gregory <gg@slimlogic.co.uk> |
7 | * | 7 | * |
@@ -552,15 +552,13 @@ static void palmas_dt_to_pdata(struct device *dev, | |||
552 | pdata->reg_init[idx] = devm_kzalloc(dev, | 552 | pdata->reg_init[idx] = devm_kzalloc(dev, |
553 | sizeof(struct palmas_reg_init), GFP_KERNEL); | 553 | sizeof(struct palmas_reg_init), GFP_KERNEL); |
554 | 554 | ||
555 | ret = of_property_read_u32(palmas_matches[idx].of_node, | 555 | pdata->reg_init[idx]->warm_reset = |
556 | "ti,warm-reset", &prop); | 556 | of_property_read_u32(palmas_matches[idx].of_node, |
557 | if (!ret) | 557 | "ti,warm-reset", &prop); |
558 | pdata->reg_init[idx]->warm_reset = prop; | ||
559 | 558 | ||
560 | ret = of_property_read_u32(palmas_matches[idx].of_node, | 559 | pdata->reg_init[idx]->roof_floor = |
561 | "ti,roof-floor", &prop); | 560 | of_property_read_bool(palmas_matches[idx].of_node, |
562 | if (!ret) | 561 | "ti,roof-floor"); |
563 | pdata->reg_init[idx]->roof_floor = prop; | ||
564 | 562 | ||
565 | ret = of_property_read_u32(palmas_matches[idx].of_node, | 563 | ret = of_property_read_u32(palmas_matches[idx].of_node, |
566 | "ti,mode-sleep", &prop); | 564 | "ti,mode-sleep", &prop); |
@@ -572,15 +570,14 @@ static void palmas_dt_to_pdata(struct device *dev, | |||
572 | if (!ret) | 570 | if (!ret) |
573 | pdata->reg_init[idx]->tstep = prop; | 571 | pdata->reg_init[idx]->tstep = prop; |
574 | 572 | ||
575 | ret = of_property_read_u32(palmas_matches[idx].of_node, | 573 | ret = of_property_read_bool(palmas_matches[idx].of_node, |
576 | "ti,vsel", &prop); | 574 | "ti,smps-range"); |
577 | if (!ret) | 575 | if (ret) |
578 | pdata->reg_init[idx]->vsel = prop; | 576 | pdata->reg_init[idx]->vsel = |
577 | PALMAS_SMPS12_VOLTAGE_RANGE; | ||
579 | } | 578 | } |
580 | 579 | ||
581 | ret = of_property_read_u32(node, "ti,ldo6-vibrator", &prop); | 580 | pdata->ldo6_vibrator = of_property_read_bool(node, "ti,ldo6-vibrator"); |
582 | if (!ret) | ||
583 | pdata->ldo6_vibrator = prop; | ||
584 | } | 581 | } |
585 | 582 | ||
586 | 583 | ||
@@ -805,6 +802,13 @@ static int palmas_remove(struct platform_device *pdev) | |||
805 | 802 | ||
806 | static struct of_device_id of_palmas_match_tbl[] = { | 803 | static struct of_device_id of_palmas_match_tbl[] = { |
807 | { .compatible = "ti,palmas-pmic", }, | 804 | { .compatible = "ti,palmas-pmic", }, |
805 | { .compatible = "ti,palmas-charger-pmic", }, | ||
806 | { .compatible = "ti,twl6035-pmic", }, | ||
807 | { .compatible = "ti,twl6036-pmic", }, | ||
808 | { .compatible = "ti,twl6037-pmic", }, | ||
809 | { .compatible = "ti,tps65913-pmic", }, | ||
810 | { .compatible = "ti,tps65914-pmic", }, | ||
811 | { .compatible = "ti,tps80036-pmic", }, | ||
808 | { /* end */ } | 812 | { /* end */ } |
809 | }; | 813 | }; |
810 | 814 | ||