LOCAL uint32_t _ov8830_PowerOn(uint32_t power_on) { SENSOR_AVDD_VAL_E dvdd_val = g_ov8830_mipi_raw_info.dvdd_val; SENSOR_AVDD_VAL_E avdd_val = g_ov8830_mipi_raw_info.avdd_val; SENSOR_AVDD_VAL_E iovdd_val = g_ov8830_mipi_raw_info.iovdd_val; BOOLEAN power_down = g_ov8830_mipi_raw_info.power_down_level; BOOLEAN reset_level = g_ov8830_mipi_raw_info.reset_pulse_level; if (SENSOR_TRUE == power_on) { Sensor_PowerDown(power_down); // Open power Sensor_SetMonitorVoltage(SENSOR_AVDD_2800MV); Sensor_SetVoltage(dvdd_val, avdd_val, iovdd_val); usleep(20*1000); Sensor_SetMCLK(SENSOR_DEFALUT_MCLK); usleep(10*1000); Sensor_PowerDown(!power_down); // Reset sensor Sensor_Reset(reset_level); } else { Sensor_PowerDown(power_down); Sensor_SetMCLK(SENSOR_DISABLE_MCLK); Sensor_SetVoltage(SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED); Sensor_SetMonitorVoltage(SENSOR_AVDD_CLOSED); } SENSOR_PRINT("SENSOR_ov8830: _ov8830_Power_On(1:on, 0:off): %d", power_on); return SENSOR_SUCCESS; }
LOCAL uint32_t _BF3905_PowerOn(uint32_t power_on) { SENSOR_AVDD_VAL_E dvdd_val=g_BF3905_mipi_yuv_info.dvdd_val; SENSOR_AVDD_VAL_E avdd_val=g_BF3905_mipi_yuv_info.avdd_val; SENSOR_AVDD_VAL_E iovdd_val=g_BF3905_mipi_yuv_info.iovdd_val; BOOLEAN power_down=g_BF3905_mipi_yuv_info.power_down_level; BOOLEAN reset_level=g_BF3905_mipi_yuv_info.reset_pulse_level; //uint32_t reset_width=g_BF3905_mipi_yuv_info.reset_pulse_width; if(SENSOR_TRUE==power_on) { Sensor_PowerDown(power_down); // Open power Sensor_SetVoltage(dvdd_val, avdd_val, iovdd_val); SENSOR_Sleep(20); Sensor_SetMCLK(SENSOR_DEFALUT_MCLK); SENSOR_Sleep(10); Sensor_PowerDown(!power_down); // Reset sensor Sensor_Reset(reset_level); CMR_LOGE("qzhu BF3905 power_on is true\n"); } else { Sensor_PowerDown(power_down); SENSOR_Sleep(10); Sensor_SetMCLK(SENSOR_DISABLE_MCLK); Sensor_SetVoltage(SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED); CMR_LOGE("qzhu BF3905 power_on is false\n"); } return SENSOR_SUCCESS; }
LOCAL uint32_t SP0A19_Power_On(uint32_t power_on) { SENSOR_AVDD_VAL_E dvdd_val=g_SP0A19_yuv_info.dvdd_val; SENSOR_AVDD_VAL_E avdd_val=g_SP0A19_yuv_info.avdd_val; SENSOR_AVDD_VAL_E iovdd_val=g_SP0A19_yuv_info.iovdd_val; BOOLEAN power_down=g_SP0A19_yuv_info.power_down_level; BOOLEAN reset_level=g_SP0A19_yuv_info.reset_pulse_level; uint32_t reset_width=g_SP0A19_yuv_info.reset_pulse_width; if(SENSOR_TRUE==power_on) { Sensor_PowerDown(power_down); // Open power Sensor_SetVoltage(dvdd_val, avdd_val, iovdd_val); //Sensor_SetMonitorVoltage(SENSOR_AVDD_2800MV); SENSOR_Sleep(50); Sensor_SetMCLK(SENSOR_DEFALUT_MCLK); SENSOR_Sleep(20); Sensor_PowerDown(!power_down); // Reset sensor Sensor_Reset(reset_level); } else { Sensor_SetVoltage(dvdd_val, avdd_val, iovdd_val); SENSOR_Sleep(20); Sensor_PowerDown(power_down); SENSOR_Sleep(20); Sensor_SetMCLK(SENSOR_DISABLE_MCLK); Sensor_SetVoltage(SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED); //Sensor_SetMonitorVoltage(SENSOR_AVDD_CLOSED); } return SENSOR_SUCCESS; }
LOCAL uint32_t _GC0328_PowerOn(uint32_t power_on) { SENSOR_AVDD_VAL_E dvdd_val = g_GC0328_yuv_info.dvdd_val; SENSOR_AVDD_VAL_E avdd_val = g_GC0328_yuv_info.avdd_val; SENSOR_AVDD_VAL_E iovdd_val = g_GC0328_yuv_info.iovdd_val; BOOLEAN power_down = g_GC0328_yuv_info.power_down_level; BOOLEAN reset_level = g_GC0328_yuv_info.reset_pulse_level; //uint32_t reset_width=g_GC0328_yuv_info.reset_pulse_width; printk("SENSOR: _GC0328_Power_On_start(1:on, 0:off): %d \n", power_on); if (SENSOR_TRUE == power_on) { Sensor_PowerDown(power_down); // Open power //Sensor_SetVoltage(dvdd_val, avdd_val, iovdd_val); Sensor_SetVoltage(SENSOR_AVDD_CLOSED, avdd_val, iovdd_val); msleep(20); Sensor_SetMCLK(SENSOR_DEFALUT_MCLK); msleep(10); Sensor_PowerDown(!power_down); // Reset sensor Sensor_Reset(reset_level); } else { Sensor_PowerDown(power_down); Sensor_SetMCLK(SENSOR_DISABLE_MCLK); Sensor_SetVoltage(SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED, SENSOR_AVDD_CLOSED); } printk("SENSOR: _GC0328_Power_On(1:on, 0:off): %d \n", power_on); return SENSOR_SUCCESS; }