diff options
author | Nine Feng <nfeng@nvidia.com> | 2014-05-26 14:01:23 +0800 |
---|---|---|
committer | Danny Song <dsong@nvidia.com> | 2014-05-26 01:48:43 -0700 |
commit | 50edc4df14e602cac2e872ee6f090aeadfd44bf6 (patch) | |
tree | 8fc2be92a303847b13651eae818ef70d0bd7f660 | |
parent | 059af69c5f6b74cddd75d1be8488f48a19f96a88 (diff) |
ts: tn7 & tn7c: update touch regulator
1) Revert "ts :tn7c: support load switch for touch power rail"
2) Remove useless fix regulator: dvdd_ts and dvdd_lcd_1v8(which
would cause lcd and touch use differnt supplies but same ldo4)
3) Enable avdd first
Bug 200006060
Bug 1445143
This reverts commit 8b8d45d48da349159b2006202e13eea1bc652d51.
Change-Id: I807a57ccb2828c53648be6189846a0d734d52e82
Signed-off-by: Nine Feng <nfeng@nvidia.com>
Reviewed-on: http://git-master/r/414671
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Harry Hong <hhong@nvidia.com>
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: Danny Song <dsong@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-tegranote7c-power.c | 12 | ||||
-rw-r--r-- | drivers/input/touchscreen/maxim_sti.c | 55 |
2 files changed, 16 insertions, 51 deletions
diff --git a/arch/arm/mach-tegra/board-tegranote7c-power.c b/arch/arm/mach-tegra/board-tegranote7c-power.c index 66c471c2fc54..0ccc5dbe0b91 100644 --- a/arch/arm/mach-tegra/board-tegranote7c-power.c +++ b/arch/arm/mach-tegra/board-tegranote7c-power.c @@ -492,10 +492,11 @@ static struct i2c_board_info palma_device[] = { }, }; +#if 0 static struct regulator_consumer_supply fixed_reg_dvdd_lcd_1v8_supply[] = { REGULATOR_SUPPLY("dvdd_lcd", NULL), - REGULATOR_SUPPLY("dvdd_ts", "spi0.0"), }; +#endif static struct regulator_consumer_supply fixed_reg_vdd_lcd_bl_en_supply[] = { REGULATOR_SUPPLY("vdd_lcd_bl_en", NULL), @@ -505,10 +506,12 @@ static struct regulator_consumer_supply fixed_reg_vlogic_gyro_supply[] = { REGULATOR_SUPPLY("vlogic_gyro", "0-0069"), }; +#if 0 /* EN_1V8_TS From TEGRA_GPIO_PH4 */ static struct regulator_consumer_supply fixed_reg_dvdd_ts_supply[] = { REGULATOR_SUPPLY("dvdd", "spi0.0"), }; +#endif /* ENABLE 5v0 for HDMI */ static struct regulator_consumer_supply fixed_reg_vdd_hdmi_5v0_supply[] = { @@ -578,18 +581,21 @@ static struct regulator_consumer_supply fixed_reg_en_avdd_hdmi_pll_supply[] = { /* * Creating the fixed regulator device table */ - +#if 0 FIXED_REG(1, dvdd_lcd_1v8, dvdd_lcd_1v8, palmas_rails(smps8), 0, 1, PALMAS_TEGRA_GPIO_BASE + PALMAS_GPIO4, false, true, 1, 1800); +#endif FIXED_REG(2, vdd_lcd_bl_en, vdd_lcd_bl_en, NULL, 0, 1, TEGRA_GPIO_PH2, false, true, 1, 3700); +#if 0 FIXED_REG(3, dvdd_ts, dvdd_ts, palmas_rails(smps8), 0, 0, TEGRA_GPIO_PH4, false, false, 1, 1800); +#endif FIXED_REG(4, vdd_hdmi_5v0, vdd_hdmi_5v0, palmas_rails(smps10), 0, 0, @@ -628,8 +634,6 @@ FIXED_REG(9, en_avdd_hdmi_pll, en_avdd_hdmi_pll, ADD_FIXED_REG(vd_cam_1v8), #define P1988_FIXED_REG \ - ADD_FIXED_REG(dvdd_lcd_1v8), \ - ADD_FIXED_REG(dvdd_ts), \ ADD_FIXED_REG(en_lcd_1v8), \ ADD_FIXED_REG(en_avdd_hdmi_pll) diff --git a/drivers/input/touchscreen/maxim_sti.c b/drivers/input/touchscreen/maxim_sti.c index 35e9fdab4b7d..3657cafba98a 100644 --- a/drivers/input/touchscreen/maxim_sti.c +++ b/drivers/input/touchscreen/maxim_sti.c @@ -96,9 +96,6 @@ struct dev_data { struct sched_param thread_sched; struct list_head dev_list; struct regulator *reg_avdd; -#ifdef CONFIG_MACH_TEGRANOTE7C - struct regulator *reg_dvdd_ts; -#endif struct regulator *reg_dvdd; void (*service_irq)(struct dev_data *dd); #if NV_ENABLE_CPU_BOOST @@ -694,70 +691,43 @@ static int regulator_control(struct dev_data *dd, bool on) { int ret = 0; -#ifdef CONFIG_MACH_TEGRANOTE7C - if (!dd->reg_avdd || !dd->reg_dvdd || !dd->reg_dvdd_ts) -#else if (!dd->reg_avdd || !dd->reg_dvdd) -#endif return 0; if (on) { -#ifdef CONFIG_MACH_TEGRANOTE7C - ret = regulator_enable(dd->reg_dvdd_ts); + ret = regulator_enable(dd->reg_avdd); if (ret < 0) { - ERROR("Failed to enable regulator dvdd_ts: %d", ret); + ERROR("Failed to enable regulator avdd: %d", ret); return ret; } -#endif + + usleep_range(8000, 8800); ret = regulator_enable(dd->reg_dvdd); if (ret < 0) { -#ifdef CONFIG_MACH_TEGRANOTE7C - regulator_disable(dd->reg_dvdd_ts); -#endif ERROR("Failed to enable regulator dvdd: %d", ret); + regulator_disable(dd->reg_avdd); return ret; } - usleep_range(1000, 1020); - ret = regulator_enable(dd->reg_avdd); - if (ret < 0) { - ERROR("Failed to enable regulator avdd: %d", ret); -#ifdef CONFIG_MACH_TEGRANOTE7C - regulator_disable(dd->reg_dvdd_ts); -#endif - regulator_disable(dd->reg_dvdd); - return ret; - } if (prev_dvdd_rail_state == 0) atomic_set(&touch_dvdd_on, 1); prev_dvdd_rail_state = 1; } else { - if (regulator_is_enabled(dd->reg_avdd)) - ret = regulator_disable(dd->reg_avdd); - if (ret < 0) { - ERROR("Failed to disable regulator avdd: %d", ret); - return ret; - } - if (regulator_is_enabled(dd->reg_dvdd)) ret = regulator_disable(dd->reg_dvdd); if (ret < 0) { ERROR("Failed to disable regulator dvdd: %d", ret); - regulator_enable(dd->reg_avdd); return ret; } -#ifdef CONFIG_MACH_TEGRANOTE7C - if (regulator_is_enabled(dd->reg_dvdd_ts)) - ret = regulator_disable(dd->reg_dvdd_ts); + if (regulator_is_enabled(dd->reg_avdd)) + ret = regulator_disable(dd->reg_avdd); if (ret < 0) { - ERROR("Failed to disable regulator dvdd_ts: %d", ret); - regulator_enable(dd->reg_avdd); regulator_enable(dd->reg_dvdd); + ERROR("Failed to disable regulator avdd: %d", ret); return ret; } -#endif if (!regulator_is_enabled(dd->reg_dvdd)) { prev_dvdd_rail_state = 0; @@ -775,12 +745,6 @@ static void regulator_init(struct dev_data *dd) if (IS_ERR(dd->reg_avdd)) goto err_null_regulator; -#ifdef CONFIG_MACH_TEGRANOTE7C - dd->reg_dvdd_ts = devm_regulator_get(&dd->spi->dev, "dvdd_ts"); - if (IS_ERR(dd->reg_dvdd_ts)) - goto err_null_regulator; -#endif - dd->reg_dvdd = devm_regulator_get(&dd->spi->dev, "dvdd"); if (IS_ERR(dd->reg_dvdd)) goto err_null_regulator; @@ -789,9 +753,6 @@ static void regulator_init(struct dev_data *dd) err_null_regulator: dd->reg_avdd = NULL; -#ifdef CONFIG_MACH_TEGRANOTE7C - dd->reg_dvdd_ts = NULL; -#endif dd->reg_dvdd = NULL; dev_warn(&dd->spi->dev, "Failed to init regulators\n"); } |