summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>2012-01-19 12:04:01 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:29 +0200
commit572640fb1615f279ef1530839479dc49012d502c (patch)
treeec27ccae7713683798e80352cc25d797be98f46b
parentb4112a5467ada0cf75e875299fd0716206a3ab25 (diff)
regulator:ab5500: Add MBIAS1 regulator support
ST-Ericsson ID: 411009 ST-Ericsson Linux next: Not tested ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ic8fb17e4ecb09b0b5d5cdf213d67217f01ff84d8 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/45908 Reviewed-by: QABUILD Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r--drivers/regulator/ab5500.c27
-rw-r--r--include/linux/regulator/ab5500.h1
2 files changed, 27 insertions, 1 deletions
diff --git a/drivers/regulator/ab5500.c b/drivers/regulator/ab5500.c
index a3de7701923..99676f7ad8e 100644
--- a/drivers/regulator/ab5500.c
+++ b/drivers/regulator/ab5500.c
@@ -40,6 +40,7 @@
/* In SIM bank */
#define AB5500_SIM_SUP 0x14
+#define AB5500_MBIAS1 0x00
#define AB5500_MBIAS2 0x01
#define AB5500_LDO_MODE_MASK (0x3 << 4)
@@ -49,6 +50,8 @@
#define AB5500_LDO_MODE_OFF (0x0 << 4)
#define AB5500_LDO_VOLT_MASK 0x07
+#define AB5500_MBIAS1_ENABLE (0x1 << 1)
+#define AB5500_MBIAS1_MODE_MASK (0x1 << 1)
#define AB5500_MBIAS2_ENABLE (0x1 << 1)
#define AB5500_MBIAS2_VOLT_MASK (0x1 << 2)
#define AB5500_MBIAS2_MODE_MASK (0x1 << 1)
@@ -383,6 +386,10 @@ static const int ab5500_bias2_voltages[] = {
[0x01] = 2200000,
};
+static const int ab5500_bias1_voltages[] = {
+ [0x00] = 2000000,
+};
+
static struct ab5500_regulator ab5500_regulators[] = {
[AB5500_LDO_L] = {
.desc = {
@@ -509,7 +516,7 @@ static struct ab5500_regulator ab5500_regulators[] = {
},
[AB5500_BIAS2] = {
.desc = {
- .name = "BIAS2",
+ .name = "MBIAS2",
.id = AB5500_BIAS2,
.ops = &ab5500_regulator_variable_ops,
.type = REGULATOR_VOLTAGE,
@@ -526,6 +533,24 @@ static struct ab5500_regulator ab5500_regulators[] = {
.update_val_idle = AB5500_MBIAS2_ENABLE,
.voltage_mask = AB5500_MBIAS2_VOLT_MASK,
},
+ [AB5500_BIAS1] = {
+ .desc = {
+ .name = "MBIAS1",
+ .id = AB5500_BIAS1,
+ .ops = &ab5500_regulator_fixed_ops,
+ .type = REGULATOR_VOLTAGE,
+ .owner = THIS_MODULE,
+ .n_voltages = ARRAY_SIZE(ab5500_bias1_voltages),
+ },
+ .bank = AB5500_BANK_AUDIO_HEADSETUSB,
+ .reg = AB5500_MBIAS1,
+ .voltages = ab5500_bias1_voltages,
+ .enable_time = 1000,
+ .mode = AB5500_MBIAS1_ENABLE,
+ .update_mask = AB5500_MBIAS1_MODE_MASK,
+ .update_val_normal = AB5500_MBIAS1_ENABLE,
+ .update_val_idle = AB5500_MBIAS1_ENABLE,
+ },
};
diff --git a/include/linux/regulator/ab5500.h b/include/linux/regulator/ab5500.h
index b5a8dec0be6..04673d3494f 100644
--- a/include/linux/regulator/ab5500.h
+++ b/include/linux/regulator/ab5500.h
@@ -14,6 +14,7 @@ enum ab5500_regulator_id {
AB5500_LDO_L,
AB5500_LDO_VDIGMIC,
AB5500_LDO_SIM,
+ AB5500_BIAS1,
AB5500_BIAS2,
AB5500_NUM_REGULATORS,
};