diff options
author | Pradeep Goudagunta <pgoudagunta@nvidia.com> | 2012-08-24 22:24:18 +0530 |
---|---|---|
committer | Mrutyunjay Sawant <msawant@nvidia.com> | 2012-08-29 06:52:34 -0700 |
commit | 4dfd11872b78f7050c3598dc5104dd8c913a7e30 (patch) | |
tree | 294fdf5e565773e8c89201c82a6da3366e67c7f5 /drivers/regulator | |
parent | 7f5ab4cf30c5ec2ec2cd378fe41803bf715ba797 (diff) |
regulator: tps65090: Add support always/boot_on
Check if always_on or boot_on in preinit and enable regulator
accordingly.
Bug 982726
Change-Id: Ic18569bafaa8333c85a16873db32946b5cd1a40c
Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-on: http://git-master/r/127234
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/tps65090-regulator.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c index d982f1614030..b480e9745da0 100644 --- a/drivers/regulator/tps65090-regulator.c +++ b/drivers/regulator/tps65090-regulator.c @@ -188,6 +188,17 @@ static int __devinit tps65090_regulator_preinit(int id, struct device *parent = ri->dev->parent; if (!tps_pdata->enable_ext_control) { + if (tps_pdata->reg_init_data->constraints.always_on || + tps_pdata->reg_init_data->constraints.boot_on) { + ret = tps65090_set_bits(parent, + ri->rinfo->reg_en_reg, 0); + if (ret < 0) { + dev_err(ri->dev, "Error in set reg 0x%x\n", + ri->rinfo->reg_en_reg); + return ret; + } + } + ret = tps65090_clr_bits(parent, ri->rinfo->reg_en_reg, 1); if (ret < 0) { |