]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
regulator: tps65910: fix BUG_ON() shown with vrtc regulator
authorAnilKumar Ch <anilkumar@ti.com>
Mon, 15 Oct 2012 12:15:58 +0000 (17:45 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 17 Oct 2012 13:17:39 +0000 (22:17 +0900)
Fix BUG_ON() error if tps65910 VRTC regulator is used with out
rdev->desc->volt_table data. Recent changes in regulator core driver
which add support for "regulator_list_voltage_table" have BUG_ON() if
regulator descriptor do not voltage table information. This patch adds
the voltage table information to fix the issue.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/tps65910-regulator.c

index 793adda560c3c3364c2053cdb152974fc2a2f02b..1d2dd1864ae75e9b9703a7a44ac73d4c9eb9c308 100644 (file)
@@ -38,6 +38,11 @@ static const unsigned int VIO_VSEL_table[] = {
 
 /* VSEL tables for TPS65910 specific LDOs and dcdc's */
 
+/* supported VRTC voltages in microvolts */
+static const unsigned int VRTC_VSEL_table[] = {
+       1800000,
+};
+
 /* supported VDD3 voltages in microvolts */
 static const unsigned int VDD3_VSEL_table[] = {
        5000000,
@@ -95,6 +100,8 @@ static struct tps_info tps65910_regs[] = {
        {
                .name = "vrtc",
                .vin_name = "vcc7",
+               .n_voltages = ARRAY_SIZE(VRTC_VSEL_table),
+               .voltage_table = VRTC_VSEL_table,
                .enable_time_us = 2200,
        },
        {