Exemplo n.º 1
0
Arquivo: setup.c Projeto: E-LLP/n900
static void camera_power(int mode)
{
	if (mode)
		camera_power_on();
	else
		camera_power_off();
}
Exemplo n.º 2
0
static int tw9910_power(struct device *dev, int mode)
{
	if (mode)
		camera_power_on(1);
	else
		camera_power_off();

	return 0;
}
Exemplo n.º 3
0
static int ov7725_power(struct device *dev, int mode)
{
	if (mode)
		camera_power_on(0);
	else
		camera_power_off();

	return 0;
}
Exemplo n.º 4
0
int camera_module_active(bool enable)
{
	int ret;
	//struct fimc_is_core *core = device->private_data;

	if (enable) {
		ret = camera_power_on();
	} else {
		ret = camera_power_off();
	}

	if (ret) {
		pr_err("%s(), power %d failed:%d\n",
			__func__, enable, ret);
		return ret;
	}

	//fimc_is_i2c_enable_irq(core, enable);
	return 0;
}
Exemplo n.º 5
0
int enter_boot_power_down()
{
    int key;
    int ac;
    
    power_gate_init();
    lcd_disable();
    video_dac_disable();
    camera_power_off() ;
    vcc2_power_off();
    //turn_off_audio_DAC();
    if (!early_suspend_flag) {
        printf("\n boot_suspend \n");
//        if (pdata->set_exgpio_early_suspend) {
//            pdata->set_exgpio_early_suspend(OFF);
//        }
        early_power_gate_switch(OFF);
        early_clk_switch(OFF);
        early_pll_switch(OFF);
        early_suspend_flag = 1;
    }
    
    printf("enter boot_pm_suspend!\n");
    analog_switch(OFF);
    usb_switch(OFF, 0);
    usb_switch(OFF, 1);
//    if (pdata->set_vccx2) {
//        pdata->set_vccx2(OFF);
//    }
    power_gate_switch(OFF);
    clk_switch(OFF);
    pll_switch(OFF);
    clrbits_le32(P_HHI_SYS_CPU_CLK_CNTL,1<<7); //change A9-->24M 

    
    printf("boot sleep ...\n");
//	WRITE_MPEG_REG_BITS(HHI_MALI_CLK_CNTL, 0, 9, 3); // mali use xtal
//    CLEAR_CBUS_REG_MASK(HHI_SYS_CPU_CLK_CNTL, 1<<7);  // a9 use xtal
//    SET_CBUS_REG_MASK(HHI_SYS_PLL_CNTL, (1 << 15));   // turn off sys pll
//    
//    meson_power_suspend();
    
    key = powerkey_scan();
    ac = axp_charger_is_ac_online();
    while((!key)&&ac) 
    {
        key = powerkey_scan();
        ac = axp_charger_is_ac_online();
    }
    setbits_le32(P_HHI_SYS_CPU_CLK_CNTL,1<<7); //change A9-->normal 

    
    printf("boot... wake up\n");
//    if (pdata->set_vccx2) {
//        pdata->set_vccx2(ON);
//    }
    SET_CBUS_REG_MASK(HHI_SYS_CPU_CLK_CNTL, (1 << 7));  // a9 use pll
    WRITE_MPEG_REG_BITS(HHI_MALI_CLK_CNTL, 3, 9, 3); // mali use pll

    pll_switch(ON);
    clk_switch(ON);
    power_gate_switch(ON);
    usb_switch(ON, 0);
    usb_switch(ON, 1);
    analog_switch(ON);
    if (early_suspend_flag) {
        early_pll_switch(ON);
        early_clk_switch(ON);
        early_power_gate_switch(ON);
        early_suspend_flag = 0;
        printf("boot sys_resume\n");
    }    
    
    printf("mlvds init\n");
    lcd_enable();  
    printf("mlvds init finish\n");  
    
    return ac;
}