Patchwork regulator: tps65910: fix BUG_ON() shown with vrtc regulator

login
register
mail settings
Submitter AnilKumar, Chimata
Date Oct. 15, 2012, 12:15 p.m.
Message ID <1350303358-13667-1-git-send-email-anilkumar@ti.com>
Download mbox | patch
Permalink /patch/1593651/
State New, archived
Headers show

Comments

AnilKumar, Chimata - Oct. 15, 2012, 12:15 p.m.
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>
---
 drivers/regulator/tps65910-regulator.c |    7 +++++++
 1 file changed, 7 insertions(+)
Mark Brown - Oct. 17, 2012, 1:18 p.m.
On Mon, Oct 15, 2012 at 05:45:58PM +0530, AnilKumar Ch wrote:
> 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.

Applied, thanks.

Patch

diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 793adda..1d2dd18 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -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,
 	},
 	{