diff options
Diffstat (limited to 'drivers/regulator/tps62360-regulator.c')
| -rw-r--r-- | drivers/regulator/tps62360-regulator.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c index da1b2b1341ae..be6a6702cbfa 100644 --- a/drivers/regulator/tps62360-regulator.c +++ b/drivers/regulator/tps62360-regulator.c @@ -275,7 +275,7 @@ static const struct regmap_config tps62360_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = REG_CHIPID, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static struct tps62360_regulator_platform_data * @@ -296,17 +296,10 @@ static struct tps62360_regulator_platform_data * return NULL; } - if (of_find_property(np, "ti,vsel0-state-high", NULL)) - pdata->vsel0_def_state = 1; - - if (of_find_property(np, "ti,vsel1-state-high", NULL)) - pdata->vsel1_def_state = 1; - - if (of_find_property(np, "ti,enable-pull-down", NULL)) - pdata->en_internal_pulldn = true; - - if (of_find_property(np, "ti,enable-vout-discharge", NULL)) - pdata->en_discharge = true; + pdata->vsel0_def_state = of_property_read_bool(np, "ti,vsel0-state-high"); + pdata->vsel1_def_state = of_property_read_bool(np, "ti,vsel1-state-high"); + pdata->en_internal_pulldn = of_property_read_bool(np, "ti,enable-pull-down"); + pdata->en_discharge = of_property_read_bool(np, "ti,enable-vout-discharge"); return pdata; } @@ -495,9 +488,10 @@ MODULE_DEVICE_TABLE(i2c, tps62360_id); static struct i2c_driver tps62360_i2c_driver = { .driver = { .name = "tps62360", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(tps62360_of_match), }, - .probe_new = tps62360_probe, + .probe = tps62360_probe, .shutdown = tps62360_shutdown, .id_table = tps62360_id, }; |
