Just a few power management tweaks.
/arch/arm/mach-msm/board-jf_ktt.c
blob:372f655f6342dfcf0b4e7069a3b24656c48a3787 -> blob:3c99fe20df9ca3a2144efee827d65738d746196e
--- arch/arm/mach-msm/board-jf_ktt.c
+++ arch/arm/mach-msm/board-jf_ktt.c
@@ -50,7 +50,6 @@
#ifdef CONFIG_VIBETONZ
#include <linux/vibrator.h>
#endif
-
#include <linux/power_supply.h>
#ifdef CONFIG_SND_SOC_ES325
#include <linux/i2c/esxxx.h>
@@ -89,7 +88,6 @@
#include <mach/msm_iomap.h>
#include <linux/sec_jack.h>
#include "clock.h"
-
#include <mach/apq8064-gpio.h>
#ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236
@@ -1431,12 +1429,12 @@ static void msm8960_mhl_gpio_init(void)
ice_gpiox_set(FPGA_GPIO_MHL_RST, 0);
ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0);
} else if (system_rev < 6) {
- ret = gpio_request(GPIO_MHL_RST, "mhl_rst");
- if (ret < 0) {
- pr_err("mhl_rst gpio_request is failed\n");
- return;
+ ret = gpio_request(GPIO_MHL_RST, "mhl_rst");
+ if (ret < 0) {
+ pr_err("mhl_rst gpio_request is failed\n");
+ return;
+ }
}
-}
if (system_rev >= 4 && system_rev < 6) {
ret = gpio_request(GPIO_MHL_VSIL, "mhl_vsil");
if (ret < 0) {
@@ -1486,8 +1484,8 @@ static void sii8240_hw_onoff(bool onoff)
{
int rc = 0;
/*VPH_PWR : mhl_power_source
- VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V
- just power control with HDMI_EN pin or control Regulator12*/
+ VMHL_3.3V, VSIL_A_1.2V, VMHL_1.8V
+ just power control with HDMI_EN pin or control Regulator12*/
pr_info("%s: onoff =%d\n", __func__, onoff);
if (mhl_hw_onoff == onoff) {
pr_info("mhl_hw_onoff already %d\n", onoff);
@@ -1504,7 +1502,7 @@ static void sii8240_hw_onoff(bool onoff)
if (IS_ERR(mhl_l12))
return;
rc = regulator_set_voltage(mhl_l12,
- 1200000, 1200000);
+ 1200000, 1200000);
if (rc)
pr_err("error: setting for mhl_l12\n");
}
@@ -1538,7 +1536,6 @@ static void sii8240_hw_onoff(bool onoff)
ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 1);
if (system_rev >= 4 && system_rev < 6)
gpio_direction_output(PM8921_GPIO_PM_TO_SYS(32), 1);
-
} else {
if (system_rev >= 6)
ice_gpiox_set(FPGA_VSIL_A_1P2_EN, 0);
@@ -2237,13 +2234,13 @@ static void irda_led_poweron(int onoff)
if (IS_ERR(reg_l10)) {
printk(KERN_ERR"could not get 8921_l10, rc = %ld\n",
PTR_ERR(reg_l10));
- }
- }
+ }
+ }
ret = regulator_enable(reg_l10);
- if (ret)
+ if (ret)
printk(KERN_ERR"enable l10 failed, rc=%d\n", ret);
} else {
- if (regulator_is_enabled(reg_l10) ) {
+ if (regulator_is_enabled(reg_l10)) {
ret = regulator_disable(reg_l10);
if (ret)
printk(KERN_ERR"disable l10 failed, rc=%d\n", ret);
@@ -2258,10 +2255,10 @@ static int ice4_clock_en(int onoff)
return 0;
if (system_rev <= BOARD_REV09) {
- if (onoff)
- msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_ON);
- else
- msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_OFF);
+ if (onoff)
+ msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_ON);
+ else
+ msm_xo_mode_vote(fpga_xo, MSM_XO_MODE_OFF);
} else if (system_rev >= BOARD_REV10) {
static struct clk *fpga_main_clk;
if (!fpga_main_clk)
@@ -2278,6 +2275,7 @@ static int ice4_clock_en(int onoff)
}
return 0;
}
+
static void barcode_emul_poweron(int onoff)
{
int ret;
@@ -2297,8 +2295,7 @@ static void barcode_emul_poweron(int ono
}
if (system_rev >= BOARD_REV02) {
if (barcode_vreg_l33 == NULL) {
- barcode_vreg_l33 = regulator_get(NULL,
- "8917_l33");
+ barcode_vreg_l33 = regulator_get(NULL, "8917_l33");
if (IS_ERR(barcode_vreg_l33))
return ;
ret = regulator_set_voltage(barcode_vreg_l33,
@@ -2335,8 +2332,9 @@ static void barcode_emul_poweron(int ono
if (system_rev > BOARD_REV03) {
fpga_xo = msm_xo_get(MSM_XO_TCXO_A0, "ice4_fpga");
if (IS_ERR(fpga_xo)) {
- printk(KERN_ERR "%s: Couldn't get TCXO_A0 vote for ice4_fpga\n",
- __func__);
+ printk(KERN_ERR \
+ "%s: Couldn't get TCXO_A0 vote for ice4_fpga\n",
+ __func__);
}
}
} else {
@@ -2411,7 +2409,6 @@ static void barcode_gpio_config(void)
pr_info("%s\n", __func__);
pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS( \
PMIC_GPIO_FPGA_RST_N), &creset_b);
-
gpio_request_one(GPIO_FPGA_CDONE, GPIOF_IN, "FPGA_CDONE");
if (system_rev < BOARD_REV06)
gpio_request_one(GPIO_FPGA_SPI_EN, GPIOF_OUT_INIT_LOW,
@@ -3327,9 +3324,9 @@ static struct platform_device msm_tsens_
};
static struct msm_thermal_data msm_thermal_pdata = {
- .sensor_id = 7,
+ .sensor_id = 0,
.poll_ms = 250,
- .limit_temp_degC = 60,
+ .limit_temp_degC = 75,
.temp_hysteresis_degC = 10,
.freq_step = 2,
};
@@ -3397,14 +3394,14 @@ static struct msm_rpmrs_level msm_rpmrs_
MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT,
MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE),
true,
- 1, 784, 180000, 100,
+ 1, 650, 180000, 100,
},
{
MSM_PM_SLEEP_MODE_RETENTION,
MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE),
true,
- 415, 715, 340827, 475,
+ 415, 650, 340827, 475,
},
{