From cefd31596ee0595511243347a3b43d5dd493dd03 Mon Sep 17 00:00:00 2001 From: Graeme Gregory Date: Thu, 7 Mar 2013 13:17:48 +0000 Subject: [PATCH] --- yaml --- r: 365163 b: refs/heads/master c: 7be859f74ce232361c39d92d29da207ce6ee72bb h: refs/heads/master i: 365161: a369e875af28e2a3e0be8f34116d0d85bdc7e6d5 365159: a38cf60aab34809a662e0fd449b4cb07511832f7 v: v3 --- [refs] | 2 +- trunk/drivers/regulator/palmas-regulator.c | 36 ++++++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index e5b5eb74ad1c..7f955a83c333 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3c870e3f9d9d98f1ab98614b3b1fd5c79287d361 +refs/heads/master: 7be859f74ce232361c39d92d29da207ce6ee72bb diff --git a/trunk/drivers/regulator/palmas-regulator.c b/trunk/drivers/regulator/palmas-regulator.c index 4f86f6cab620..c25c2ff48305 100644 --- a/trunk/drivers/regulator/palmas-regulator.c +++ b/trunk/drivers/regulator/palmas-regulator.c @@ -1,7 +1,7 @@ /* * Driver for Regulator part of Palmas PMIC Chips * - * Copyright 2011-2012 Texas Instruments Inc. + * Copyright 2011-2013 Texas Instruments Inc. * * Author: Graeme Gregory * @@ -552,15 +552,13 @@ static void palmas_dt_to_pdata(struct device *dev, pdata->reg_init[idx] = devm_kzalloc(dev, sizeof(struct palmas_reg_init), GFP_KERNEL); - ret = of_property_read_u32(palmas_matches[idx].of_node, - "ti,warm-reset", &prop); - if (!ret) - pdata->reg_init[idx]->warm_reset = prop; + pdata->reg_init[idx]->warm_reset = + of_property_read_u32(palmas_matches[idx].of_node, + "ti,warm-reset", &prop); - ret = of_property_read_u32(palmas_matches[idx].of_node, - "ti,roof-floor", &prop); - if (!ret) - pdata->reg_init[idx]->roof_floor = prop; + pdata->reg_init[idx]->roof_floor = + of_property_read_bool(palmas_matches[idx].of_node, + "ti,roof-floor"); ret = of_property_read_u32(palmas_matches[idx].of_node, "ti,mode-sleep", &prop); @@ -572,15 +570,14 @@ static void palmas_dt_to_pdata(struct device *dev, if (!ret) pdata->reg_init[idx]->tstep = prop; - ret = of_property_read_u32(palmas_matches[idx].of_node, - "ti,vsel", &prop); - if (!ret) - pdata->reg_init[idx]->vsel = prop; + ret = of_property_read_bool(palmas_matches[idx].of_node, + "ti,smps-range"); + if (ret) + pdata->reg_init[idx]->vsel = + PALMAS_SMPS12_VOLTAGE_RANGE; } - ret = of_property_read_u32(node, "ti,ldo6-vibrator", &prop); - if (!ret) - pdata->ldo6_vibrator = prop; + pdata->ldo6_vibrator = of_property_read_bool(node, "ti,ldo6-vibrator"); } @@ -805,6 +802,13 @@ static int palmas_remove(struct platform_device *pdev) static struct of_device_id of_palmas_match_tbl[] = { { .compatible = "ti,palmas-pmic", }, + { .compatible = "ti,palmas-charger-pmic", }, + { .compatible = "ti,twl6035-pmic", }, + { .compatible = "ti,twl6036-pmic", }, + { .compatible = "ti,twl6037-pmic", }, + { .compatible = "ti,tps65913-pmic", }, + { .compatible = "ti,tps65914-pmic", }, + { .compatible = "ti,tps80036-pmic", }, { /* end */ } };