Browse Source

regulator: Voltage count for AB3100

This sets the number of voltages for the AB3100 regulators so that
they play well with the voltage listing functions and can be used
properly with the MMC regulator integration glue for example.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Linus Walleij 15 years ago
parent
commit
75f2ba8f00
1 changed files with 6 additions and 0 deletions
  1. 6 0
      drivers/regulator/ab3100.c

+ 6 - 0
drivers/regulator/ab3100.c

@@ -521,30 +521,35 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
 		.name = "LDO_E",
 		.name = "LDO_E",
 		.id   = AB3100_LDO_E,
 		.id   = AB3100_LDO_E,
 		.ops  = &regulator_ops_variable_sleepable,
 		.ops  = &regulator_ops_variable_sleepable,
+		.n_voltages = ARRAY_SIZE(ldo_e_buck_typ_voltages),
 		.type = REGULATOR_VOLTAGE,
 		.type = REGULATOR_VOLTAGE,
 	},
 	},
 	{
 	{
 		.name = "LDO_F",
 		.name = "LDO_F",
 		.id   = AB3100_LDO_F,
 		.id   = AB3100_LDO_F,
 		.ops  = &regulator_ops_variable,
 		.ops  = &regulator_ops_variable,
+		.n_voltages = ARRAY_SIZE(ldo_f_typ_voltages),
 		.type = REGULATOR_VOLTAGE,
 		.type = REGULATOR_VOLTAGE,
 	},
 	},
 	{
 	{
 		.name = "LDO_G",
 		.name = "LDO_G",
 		.id   = AB3100_LDO_G,
 		.id   = AB3100_LDO_G,
 		.ops  = &regulator_ops_variable,
 		.ops  = &regulator_ops_variable,
+		.n_voltages = ARRAY_SIZE(ldo_g_typ_voltages),
 		.type = REGULATOR_VOLTAGE,
 		.type = REGULATOR_VOLTAGE,
 	},
 	},
 	{
 	{
 		.name = "LDO_H",
 		.name = "LDO_H",
 		.id   = AB3100_LDO_H,
 		.id   = AB3100_LDO_H,
 		.ops  = &regulator_ops_variable,
 		.ops  = &regulator_ops_variable,
+		.n_voltages = ARRAY_SIZE(ldo_h_typ_voltages),
 		.type = REGULATOR_VOLTAGE,
 		.type = REGULATOR_VOLTAGE,
 	},
 	},
 	{
 	{
 		.name = "LDO_K",
 		.name = "LDO_K",
 		.id   = AB3100_LDO_K,
 		.id   = AB3100_LDO_K,
 		.ops  = &regulator_ops_variable,
 		.ops  = &regulator_ops_variable,
+		.n_voltages = ARRAY_SIZE(ldo_k_typ_voltages),
 		.type = REGULATOR_VOLTAGE,
 		.type = REGULATOR_VOLTAGE,
 	},
 	},
 	{
 	{
@@ -557,6 +562,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
 		.name = "BUCK",
 		.name = "BUCK",
 		.id   = AB3100_BUCK,
 		.id   = AB3100_BUCK,
 		.ops  = &regulator_ops_variable_sleepable,
 		.ops  = &regulator_ops_variable_sleepable,
+		.n_voltages = ARRAY_SIZE(ldo_e_buck_typ_voltages),
 		.type = REGULATOR_VOLTAGE,
 		.type = REGULATOR_VOLTAGE,
 	},
 	},
 };
 };