Exemplo n.º 1
0
/*
 * Module initialization
 */
static S32 __init CamacqCoreInit(void)
{
    int iRet = 0;
    CamacqTraceIN();

    CreateCamacqSensorManager( &g_pstCamacqSensorManager );

#if (CAM_SENSOR_NUM==2)//swsw_dual
    g_pstCamacqSensorManager->SetSensor( g_pstCamacqSensorManager, CAMACQ_SENSOR_SUB );
	//g_pstCamacqSensorManager->SetSensor( g_pstCamacqSensorManager, CAMACQ_SENSOR_MAIN ); //Test purpose only
   // iRet = i2c_add_driver( &CamacqSubDriver );
	printk("i2c add sub\n");
	iRet = i2c_add_driver( &CamacqSubDriver ); //test purpose only
    CamacqTraceDbg( " : sub iRet[%d]", iRet );
#endif /* CAMACQ_SENSOR_MAX==2 */
    g_pstCamacqSensorManager->SetSensor( g_pstCamacqSensorManager, CAMACQ_SENSOR_MAIN );
    CamacqTraceDbg( "driver_name=%s", CamacqMainDriver.driver.name);
    iRet = i2c_add_driver( &CamacqMainDriver );
    CamacqTraceDbg( " :main iRet[%d]", iRet );


	// attach pxa950_camera.c
    ccic_sensor_attach( g_pstCamacqSensorManager );
	
    CamacqTraceOUT();
/*
 * Module initialization
 */
static S32 __init CamacqCoreInit(void)
{
    int iRet = 0;
    CamacqTraceIN();

    CreateCamacqSensorManager( &g_pstCamacqSensorManager );

    // attach pxa950_camera.c
    ccic_sensor_attach( g_pstCamacqSensorManager );

#if (CAMACQ_SENSOR_MAX==2)
    g_pstCamacqSensorManager->SetSensor( g_pstCamacqSensorManager, CAMACQ_SENSOR_SUB );
    iRet = i2c_add_driver( &CamacqSubDriver );
    CamacqTraceDbg( " : iRet[%d]", iRet );
#endif /* CAMACQ_SENSOR_MAX==2 */

    g_pstCamacqSensorManager->SetSensor( g_pstCamacqSensorManager, CAMACQ_SENSOR_MAIN );
    iRet = i2c_add_driver( &CamacqMainDriver );
    CamacqTraceDbg( " : iRet[%d]", iRet );

    CamacqTraceOUT();

    return iRet;
}