mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop
This commit is contained in:
@@ -858,13 +858,13 @@ static int rk_fb_io_init(struct rk29_fb_setting_info *fb_setting)
|
||||
static int rk_fb_io_disable(void)
|
||||
{
|
||||
gpio_set_value(LCD_CS_PIN, LCD_CS_VALUE? 0:1);
|
||||
//gpio_set_value(LCD_CS_PIN, LCD_EN_VALUE? 0:1);
|
||||
gpio_set_value(LCD_EN_PIN, LCD_EN_VALUE? 0:1);
|
||||
return 0;
|
||||
}
|
||||
static int rk_fb_io_enable(void)
|
||||
{
|
||||
gpio_set_value(LCD_CS_PIN, LCD_CS_VALUE);
|
||||
//gpio_set_value(LCD_CS_PIN, LCD_EN_VALUE);
|
||||
gpio_set_value(LCD_EN_PIN, LCD_EN_VALUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ static void ddr_early_suspend(struct early_suspend *h)
|
||||
bool cpu1_online;
|
||||
|
||||
//Enable auto self refresh 0x01*32 DDR clk cycle
|
||||
ddr_set_auto_self_refresh(TRUE);
|
||||
ddr_set_auto_self_refresh(true);
|
||||
|
||||
cpu1_online = cpu_online(1);
|
||||
if(cpu1_online)
|
||||
@@ -43,7 +43,7 @@ static void ddr_early_resume(struct early_suspend *h)
|
||||
bool cpu1_online;
|
||||
|
||||
//Disable auto self refresh
|
||||
ddr_set_auto_self_refresh(FALSE);
|
||||
ddr_set_auto_self_refresh(false);
|
||||
|
||||
cpu1_online = cpu_online(1);
|
||||
if(cpu1_online)
|
||||
|
||||
31
drivers/mfd/twl6030-gpadc.c
Normal file → Executable file
31
drivers/mfd/twl6030-gpadc.c
Normal file → Executable file
@@ -640,6 +640,13 @@ twl6030_gpadc_start_conversion(struct twl6030_gpadc_data *gpadc,
|
||||
}
|
||||
}
|
||||
|
||||
static int twl6030_gpadc_is_conversion_ready(
|
||||
struct twl6030_gpadc_data *gpadc, u8 status_reg)
|
||||
{
|
||||
u8 reg = twl6030_gpadc_read(gpadc, status_reg);
|
||||
return !(reg & TWL6030_GPADC_BUSY) && (reg & TWL6030_GPADC_EOC_SW);
|
||||
}
|
||||
|
||||
static int twl6030_gpadc_wait_conversion_ready(
|
||||
struct twl6030_gpadc_data *gpadc,
|
||||
unsigned int timeout_ms, u8 status_reg)
|
||||
@@ -648,14 +655,16 @@ static int twl6030_gpadc_wait_conversion_ready(
|
||||
|
||||
timeout = jiffies + msecs_to_jiffies(timeout_ms);
|
||||
do {
|
||||
u8 reg;
|
||||
|
||||
reg = twl6030_gpadc_read(gpadc, status_reg);
|
||||
if (!(reg & TWL6030_GPADC_BUSY) && (reg & TWL6030_GPADC_EOC_SW))
|
||||
if (twl6030_gpadc_is_conversion_ready(gpadc, status_reg))
|
||||
return 0;
|
||||
msleep_interruptible(1);
|
||||
} while (!time_after(jiffies, timeout));
|
||||
|
||||
return -EAGAIN;
|
||||
/* one more checking against scheduler-caused timeout */
|
||||
if (twl6030_gpadc_is_conversion_ready(gpadc, status_reg))
|
||||
return 0;
|
||||
else
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
/* locks held by caller */
|
||||
@@ -1199,11 +1208,11 @@ static int twl6032_calibration(struct twl6030_gpadc_data *gpadc)
|
||||
/* D1 */
|
||||
d1 = (trim_regs[11] & 0x0F) << 3;
|
||||
d1 |= (trim_regs[9] & 0x0E) >> 1;
|
||||
if (trim_regs[1] & 0x01)
|
||||
if (trim_regs[9] & 0x01)
|
||||
d1 = -d1;
|
||||
|
||||
/* D2 */
|
||||
d2 = (trim_regs[15] & 0x0F) << 2;
|
||||
d2 = (trim_regs[15] & 0x0F) << 3;
|
||||
d2 |= (trim_regs[13] & 0x0E) >> 1;
|
||||
if (trim_regs[13] & 0x01)
|
||||
d2 = -d2;
|
||||
@@ -1216,8 +1225,8 @@ static int twl6032_calibration(struct twl6030_gpadc_data *gpadc)
|
||||
if (trim_regs[1] & 0x01)
|
||||
temp = -temp;
|
||||
|
||||
d1 = (trim_regs[1] & 0x7E) >> 1;
|
||||
if (trim_regs[12] & 0x01)
|
||||
d1 = (trim_regs[5] & 0x7E) >> 1;
|
||||
if (trim_regs[5] & 0x01)
|
||||
d1 = -d1;
|
||||
|
||||
d1 += temp;
|
||||
@@ -1228,8 +1237,8 @@ static int twl6032_calibration(struct twl6030_gpadc_data *gpadc)
|
||||
if (trim_regs[2] & 0x01)
|
||||
temp = -temp;
|
||||
|
||||
d2 = (trim_regs[6] & 0x7F) >> 1;
|
||||
if (trim_regs[14] & 0x01)
|
||||
d2 = (trim_regs[6] & 0xFF) >> 1;
|
||||
if (trim_regs[6] & 0x01)
|
||||
d2 = -d2;
|
||||
|
||||
d2 += temp;
|
||||
|
||||
Reference in New Issue
Block a user