diff options
author | Shreshtha Sahu <ssahu@nvidia.com> | 2014-07-25 13:45:24 +0000 |
---|---|---|
committer | Winnie Hsu <whsu@nvidia.com> | 2014-10-29 10:43:43 -0700 |
commit | d6be01e283fac2842a3749e5eed30c17b346750e (patch) | |
tree | d32a59e305ee91075f0811dd7e8bfa5f74720bd9 | |
parent | 9f529900d770ed23a881963df4fe8c966bca1792 (diff) |
ARM: tegra: ardbeg: add 2.8V supply for dw9718
Add 2.8V supply required by dw9718.
Bug 1359310
Change-Id: I5c2a73e69f321793db819618a9bab62d2935e353
Signed-off-by: Shreshtha Sahu <ssahu@nvidia.com>
Signed-off-by: Mihir Thakkar <mthakkar@nvidia.com>
Reviewed-on: http://git-master/r/555461
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Tushar Khinvasara <tkhinvasara@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-ardbeg-sensors.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-ardbeg-sensors.c b/arch/arm/mach-tegra/board-ardbeg-sensors.c index e67e1f528dd4..fbac42ef4323 100644 --- a/arch/arm/mach-tegra/board-ardbeg-sensors.c +++ b/arch/arm/mach-tegra/board-ardbeg-sensors.c @@ -567,6 +567,7 @@ struct imx135_platform_data ardbeg_imx135_data = { .repeat = 1, .delay_frm = 0, }, + .ext_reg = true, .power_on = ardbeg_imx135_power_on, .power_off = ardbeg_imx135_power_off, }; @@ -588,7 +589,7 @@ static int ardbeg_dw9718_power_on(struct dw9718_power_rail *pw) int err; pr_info("%s\n", __func__); - if (unlikely(!pw || !pw->vdd || !pw->vdd_i2c)) + if (unlikely(!pw || !pw->vdd || !pw->vdd_i2c || !pw->vana)) return -EFAULT; err = regulator_enable(pw->vdd); @@ -599,12 +600,19 @@ static int ardbeg_dw9718_power_on(struct dw9718_power_rail *pw) if (unlikely(err)) goto dw9718_i2c_fail; + err = regulator_enable(pw->vana); + if (unlikely(err)) + goto dw9718_ana_fail; + usleep_range(1000, 1020); /* return 1 to skip the in-driver power_on sequence */ pr_debug("%s --\n", __func__); return 1; +dw9718_ana_fail: + regulator_disable(pw->vdd_i2c); + dw9718_i2c_fail: regulator_disable(pw->vdd); @@ -617,11 +625,12 @@ static int ardbeg_dw9718_power_off(struct dw9718_power_rail *pw) { pr_info("%s\n", __func__); - if (unlikely(!pw || !pw->vdd || !pw->vdd_i2c)) + if (unlikely(!pw || !pw->vdd || !pw->vdd_i2c || !pw->vana)) return -EFAULT; regulator_disable(pw->vdd); regulator_disable(pw->vdd_i2c); + regulator_disable(pw->vana); return 1; } |