summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps80031.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-11-17 12:31:40 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:50:19 -0800
commit76277d029d1890725dbf6321944baaadfe67b024 (patch)
tree99e3324f7a62c509a04bd409c5050f0dd0cabca7 /drivers/mfd/tps80031.c
parentecfa0055698c92c4155a03f5dfc2b05c5dea0729 (diff)
regulator: tps80031: Check configuraton for LDO2-Track mode
Some of the values are not supported in the LDO2 configuration when using in track mode due to hw issue in tps80031 and tps80032-ES1.0. Adding proper check before configuring the LDO2 in this case. bug 898613 Reviewed-on: http://git-master/r/65441 (cherry picked from commit 58e3672102825b662ea904b46b6c1efbf639365b) Change-Id: I4e63a932d32c7cb2d13a07611acfa0b7dae649cc Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/66327 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com> Rebase-Id: R8b818dcb4fdaab118426df32144f846a0ab00fb3
Diffstat (limited to 'drivers/mfd/tps80031.c')
-rw-r--r--drivers/mfd/tps80031.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index 094adaa19a49..1cffa45f1e96 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -198,6 +198,7 @@ struct tps80031_client {
struct tps80031 {
struct device *dev;
unsigned long chip_info;
+ int es_version;
struct gpio_chip gpio;
struct irq_chip irq_chip;
@@ -484,6 +485,13 @@ unsigned long tps80031_get_chip_info(struct device *dev)
}
EXPORT_SYMBOL_GPL(tps80031_get_chip_info);
+int tps80031_get_pmu_version(struct device *dev)
+{
+ struct tps80031 *tps80031 = dev_get_drvdata(dev);
+ return tps80031->es_version;
+}
+EXPORT_SYMBOL_GPL(tps80031_get_pmu_version);
+
static struct tps80031 *tps80031_dev;
int tps80031_power_off(void)
{
@@ -1009,7 +1017,8 @@ static int dbg_tps_show(struct seq_file *s, void *unused)
print_regs("MASK_PH Regs", s, SLAVE_ID1, 0x20, 0x21);
print_regs("PMC MISC Regs", s, SLAVE_ID1, 0xE0, 0xEF);
print_regs("CONT_STATE", s, SLAVE_ID2, 0xE0, 0xE4);
- print_regs("VERNUM Regs", s, SLAVE_ID1, 0x87, 0x87);
+ print_regs("VERNUM Regs", s, SLAVE_ID3, 0x87, 0x87);
+ print_regs("EEPROM Regs", s, SLAVE_ID3, 0xDF, 0xDF);
print_regs("CHARGE Regs", s, SLAVE_ID2, 0xDA, 0xF5);
return 0;
}
@@ -1099,6 +1108,7 @@ static int __devinit tps80031_i2c_probe(struct i2c_client *client,
if (tps80031 == NULL)
return -ENOMEM;
+ tps80031->es_version = jtag_ver;
tps80031->dev = &client->dev;
i2c_set_clientdata(client, tps80031);
tps80031->chip_info = id->driver_data;