summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authormattis fjallstrom <mattis@acm.org>2015-07-23 17:15:27 -0700
committermattis fjallstrom <mattis@acm.org>2015-07-23 17:15:27 -0700
commit74d71e3bbccfdb208dd4385df5a636f889b3cd05 (patch)
tree1da3047144075bed53290b018a675d9686c4fb69 /drivers/regulator
parent5d1c09eedec0cf5fd486d240b4ede1c476ed6adf (diff)
parentcd0f92406cc231fda66c30312f48d12fab5ac614 (diff)
downloadolio-linux-3.10-74d71e3bbccfdb208dd4385df5a636f889b3cd05.tar.xz
olio-linux-3.10-74d71e3bbccfdb208dd4385df5a636f889b3cd05.zip
Merged bluetooth and ST mods from mattis_bt_work.
Change-Id: Ic904469eae89e5678a502e78309b30ab9715cd41
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c13
-rw-r--r--drivers/regulator/omap-pmic-regulator.c32
2 files changed, 35 insertions, 10 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7c75ab88f9b..815d6df8bd5 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3673,9 +3673,8 @@ regulator_register(const struct regulator_desc *regulator_desc,
add_dev:
/* add consumers devices */
-
if (init_data) {
- for (i = 0; i < init_data->num_consumer_supplies; i++) {
+ for (i = 0; i < init_data->num_consumer_supplies; i++) {
ret = set_consumer_device_supply(rdev,
init_data->consumer_supplies[i].dev_name,
init_data->consumer_supplies[i].supply);
@@ -3685,14 +3684,13 @@ add_dev:
goto unset_supplies;
}
}
- }
+ }
list_add(&rdev->list, &regulator_list);
rdev_init_debugfs(rdev);
out:
mutex_unlock(&regulator_list_mutex);
-
return rdev;
unset_supplies:
@@ -3712,8 +3710,7 @@ wash:
clean:
kfree(rdev);
rdev = ERR_PTR(ret);
-
- goto out;
+ goto out;
}
EXPORT_SYMBOL_GPL(regulator_register);
@@ -3983,12 +3980,8 @@ static int __init regulator_init_complete(void)
* with DT to provide them just assume that a DT enabled
* system has full constraints.
*/
-
-#if 0
- // TODO OLIO: This assumption isn't true for us. Not yet, at least.
if (of_have_populated_dt())
has_full_constraints = true;
-#endif
mutex_lock(&regulator_list_mutex);
diff --git a/drivers/regulator/omap-pmic-regulator.c b/drivers/regulator/omap-pmic-regulator.c
index 2eab7c158e2..ca71c9fd85b 100644
--- a/drivers/regulator/omap-pmic-regulator.c
+++ b/drivers/regulator/omap-pmic-regulator.c
@@ -518,6 +518,36 @@ static const struct omap_pmic_info omap_tps65912_dcdc4 = {
.voltage_selector_zero = true,
};
+static const struct omap_pmic_info omap_tps65910_vdd1 = {
+ .slave_addr = 0x12,
+ .voltage_reg_addr = 0x22,
+ .cmd_reg_addr = 0x23,
+ .i2c_timeout_us = 200,
+ .slew_rate_uV = 7500,
+ .step_size_uV = 12500,
+ .min_uV = 562500,
+ .max_uV = 1350000,
+ .voltage_selector_offset = 0,
+ .voltage_selector_mask = 0x7F,
+ .voltage_selector_setbits = 0x0,
+ .voltage_selector_zero = true,
+};
+
+static const struct omap_pmic_info omap_tps65910_vdd2 = {
+ .slave_addr = 0x12,
+ .voltage_reg_addr = 0x24,
+ .cmd_reg_addr = 0x25,
+ .i2c_timeout_us = 200,
+ .slew_rate_uV = 7500,
+ .step_size_uV = 12500,
+ .min_uV = 562500,
+ .max_uV = 1200000,
+ .voltage_selector_offset = 0,
+ .voltage_selector_mask = 0x7F,
+ .voltage_selector_setbits = 0x0,
+ .voltage_selector_zero = true,
+};
+
static const struct of_device_id omap_pmic_of_match_tbl[] = {
{.compatible = "ti,omap-twl4030-vdd1", .data = &omap_twl4030_vdd1,},
{.compatible = "ti,omap-twl4030-vdd2", .data = &omap_twl4030_vdd2,},
@@ -533,6 +563,8 @@ static const struct of_device_id omap_pmic_of_match_tbl[] = {
{.compatible = "ti,omap-twl6035-smps8", .data = &omap_twl6035_smps8,},
{.compatible = "ti,omap-tps65912-dcdc1", .data = &omap_tps65912_dcdc1,},
{.compatible = "ti,omap-tps65912-dcdc4", .data = &omap_tps65912_dcdc4,},
+ {.compatible = "ti,omap-tps65910-vdd1", .data = &omap_tps65910_vdd1,},
+ {.compatible = "ti,omap-tps65910-vdd2", .data = &omap_tps65910_vdd2,},
{},
};
MODULE_DEVICE_TABLE(of, omap_pmic_of_match_tbl);