A22:XBL modify camera gc0309
authorroot <root@lw.(none)>
Fri, 29 Jul 2011 04:17:44 +0000 (12:17 +0800)
committerroot <root@lw.(none)>
Thu, 18 Aug 2011 09:46:08 +0000 (17:46 +0800)
arch/arm/mach-rk29/board-rk29-a22.c
drivers/media/video/gc0309.c [changed mode: 0755->0644]
drivers/media/video/rk29_camera.c [changed mode: 0755->0644]

index 6a03246fb45a29662b84f5959136ebbdc4c94837..7528c4733671c0777171ddd1f93818b81e9e36ef 100644 (file)
 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_GC0309  /* front camera sensor */
 #define CONFIG_SENSOR_IIC_ADDR_1           0x42
 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1    1
-#define CONFIG_SENSOR_POWER_PIN_1         INVALID_GPIO
+#define CONFIG_SENSOR_POWER_PIN_1        RK29_PIN5_PA0 //INVALID_GPIO
 #define CONFIG_SENSOR_RESET_PIN_1         INVALID_GPIO
 #define CONFIG_SENSOR_POWERDN_PIN_1       RK29_PIN5_PD7
 #define CONFIG_SENSOR_FALSH_PIN_1         INVALID_GPIO
-#define CONFIG_SENSOR_POWERACTIVE_LEVEL_1 RK29_CAM_POWERACTIVE_L
+#define CONFIG_SENSOR_POWERACTIVE_LEVEL_1 RK29_CAM_POWERACTIVE_H
 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_1 RK29_CAM_RESETACTIVE_L
 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_1 RK29_CAM_POWERDNACTIVE_H
 #define CONFIG_SENSOR_FLASHACTIVE_LEVEL_1 RK29_CAM_FLASHACTIVE_L
old mode 100755 (executable)
new mode 100644 (file)
index 8d5b12b..404628c
@@ -1421,10 +1421,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
     char value;
     int ret;
 
-    SENSOR_DG("\n-------------%s..%s.. %d,val = %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__,val);
-
        if (sensor_ioctrl(icd, Sensor_PowerDown, 0) < 0) {
-                SENSOR_DG("\n-------------%s..%s.. %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
                ret = -ENODEV;
                goto sensor_INIT_ERR;
        }
@@ -1439,7 +1436,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
         ret = -ENODEV;
                goto sensor_INIT_ERR;
     }
-SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+
     mdelay(5);  //delay 5 microseconds
        /* check if it is an sensor sensor */
     ret = sensor_read(client, 0x00, &value);
@@ -1448,7 +1445,7 @@ SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION
         ret = -ENODEV;
         goto sensor_INIT_ERR;
     }
-       SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+
     if (value == SENSOR_ID) {
         sensor->model = SENSOR_V4L2_IDENT;
     } else {
@@ -1456,7 +1453,7 @@ SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION
         ret = -ENODEV;
         goto sensor_INIT_ERR;
     }
-SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+
     ret = sensor_write_array(client, sensor_init_data);
     if (ret != 0)
     {
@@ -1468,7 +1465,7 @@ SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION
     //icd->user_height = SENSOR_INIT_HEIGHT;
     sensor->info_priv.winseqe_cur_addr  = (int)SENSOR_INIT_WINSEQADR;
        sensor->info_priv.pixfmt = SENSOR_INIT_PIXFMT;
-SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+
     /* sensor sensor information for initialization  */
        qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_DO_WHITE_BALANCE);
        if (qctrl)
@@ -1509,7 +1506,7 @@ SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION
        if (qctrl)
         sensor->info_priv.focus = qctrl->default_value;
        #endif
-SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+
        #if CONFIG_SENSOR_Flash 
        qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FLASH);
        if (qctrl)
@@ -1528,7 +1525,6 @@ sensor_INIT_ERR:
 static int sensor_deactivate(struct i2c_client *client)
 {
        struct soc_camera_device *icd = client->dev.platform_data;
-       SENSOR_DG("\n----------------------------%s..%s.. Enter\n",SENSOR_NAME_STRING(),__FUNCTION__);
 
        /* ddl@rock-chips.com : all sensor output pin must change to input for other sensor */
        sensor_ioctrl(icd, Sensor_PowerDown, 1);
@@ -1726,7 +1722,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)
         set_h = SENSOR_INIT_HEIGHT;
                SENSOR_TR("\n %s..%s Format is Invalidate. pix->width = %d.. pix->height = %d\n",SENSOR_NAME_STRING(),__FUNCTION__,pix->width,pix->height);
     }
-       SENSOR_TR("------------------------------%s,    %s   ,%d,\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+       
        if ((int)winseqe_set_addr  != sensor->info_priv.winseqe_cur_addr) {
                ret |= sensor_write_array(client, winseqe_set_addr);
                if (ret != 0) {
@@ -2492,8 +2488,6 @@ static int sensor_video_probe(struct soc_camera_device *icd,
     int ret;
     struct sensor *sensor = to_sensor(client);
 
-       SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
-
     /* We must have a parent by now. And it cannot be a wrong one.
      * So this entire test is completely redundant. */
     if (!icd->dev.parent ||
@@ -2504,7 +2498,7 @@ static int sensor_video_probe(struct soc_camera_device *icd,
                ret = -ENODEV;
                goto sensor_video_probe_err;
        }
-       SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+       
     /* soft reset */
     ret = sensor_write(client, 0xfe, 0x80);
     if (ret != 0)
@@ -2513,7 +2507,7 @@ static int sensor_video_probe(struct soc_camera_device *icd,
         return -ENODEV;
     }
     mdelay(5);          //delay 5 microseconds
-SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+
     /* check if it is an sensor sensor */
     ret = sensor_read(client, 0x00, &value);
     if (ret != 0) {
@@ -2521,7 +2515,7 @@ SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION
         ret = -ENODEV;
         goto sensor_video_probe_err;
     }
-SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
+
     if (value == SENSOR_ID) {
         sensor->model = SENSOR_V4L2_IDENT;
                SENSOR_TR("chip id:0x%x\n",value);
@@ -2533,7 +2527,6 @@ SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION
        
     icd->formats = sensor_colour_formats;
     icd->num_formats = ARRAY_SIZE(sensor_colour_formats);
-SENSOR_DG("--------------------%s  ,  %s,  %d\n",SENSOR_NAME_STRING(),__FUNCTION__,__LINE__);
     return 0;
 
 sensor_video_probe_err:
old mode 100755 (executable)
new mode 100644 (file)
index 3e19731..543b072
@@ -3,47 +3,47 @@
 #ifndef PMEM_CAM_SIZE\r
 #ifdef CONFIG_VIDEO_RK29 \r
 /*---------------- Camera Sensor Fixed Macro Begin  ------------------------*/\r
-// Below Macro is fixed, programer don't change it!!!!!!
-#define _CONS(a,b) a##b
+// Below Macro is fixed, programer don't change it!!!!!!\r
+#define _CONS(a,b) a##b\r
 #define CONS(a,b) _CONS(a,b)\r
 \r
-#define __STR(x) #x
-#define _STR(x) __STR(x)
+#define __STR(x) #x\r
+#define _STR(x) __STR(x)\r
 #define STR(x) _STR(x)\r
 \r
-#if (CONFIG_SENSOR_IIC_ADDR_0 != 0x00)
-#define PMEM_SENSOR_FULL_RESOLUTION_0  CONS(CONFIG_SENSOR_0,_FULL_RESOLUTION)
-#if !(PMEM_SENSOR_FULL_RESOLUTION_0)
-#undef PMEM_SENSOR_FULL_RESOLUTION_0
-#define PMEM_SENSOR_FULL_RESOLUTION_0  0x500000
-#endif
-#else
-#define PMEM_SENSOR_FULL_RESOLUTION_0  0x00
-#endif
-#if (CONFIG_SENSOR_IIC_ADDR_1 != 0x00)
-#define PMEM_SENSOR_FULL_RESOLUTION_1  CONS(CONFIG_SENSOR_1,_FULL_RESOLUTION)
-#if !(PMEM_SENSOR_FULL_RESOLUTION_1)
-#undef PMEM_SENSOR_FULL_RESOLUTION_1
-#define PMEM_SENSOR_FULL_RESOLUTION_1  0x500000
-#endif
-#else
-#define PMEM_SENSOR_FULL_RESOLUTION_1  0x00
-#endif
-
-#if (PMEM_SENSOR_FULL_RESOLUTION_0 > PMEM_SENSOR_FULL_RESOLUTION_1)
-#define PMEM_CAM_FULL_RESOLUTION   PMEM_SENSOR_FULL_RESOLUTION_0
-#else
-#define PMEM_CAM_FULL_RESOLUTION   PMEM_SENSOR_FULL_RESOLUTION_1
-#endif
-
-#if (PMEM_CAM_FULL_RESOLUTION == 0x500000)
+#if (CONFIG_SENSOR_IIC_ADDR_0 != 0x00)\r
+#define PMEM_SENSOR_FULL_RESOLUTION_0  CONS(CONFIG_SENSOR_0,_FULL_RESOLUTION)\r
+#if !(PMEM_SENSOR_FULL_RESOLUTION_0)\r
+#undef PMEM_SENSOR_FULL_RESOLUTION_0\r
+#define PMEM_SENSOR_FULL_RESOLUTION_0  0x500000\r
+#endif\r
+#else\r
+#define PMEM_SENSOR_FULL_RESOLUTION_0  0x00\r
+#endif\r
\r
+#if (CONFIG_SENSOR_IIC_ADDR_1 != 0x00)\r
+#define PMEM_SENSOR_FULL_RESOLUTION_1  CONS(CONFIG_SENSOR_1,_FULL_RESOLUTION)\r
+#if !(PMEM_SENSOR_FULL_RESOLUTION_1)\r
+#undef PMEM_SENSOR_FULL_RESOLUTION_1\r
+#define PMEM_SENSOR_FULL_RESOLUTION_1  0x500000\r
+#endif\r
+#else\r
+#define PMEM_SENSOR_FULL_RESOLUTION_1  0x00\r
+#endif\r
+\r
+#if (PMEM_SENSOR_FULL_RESOLUTION_0 > PMEM_SENSOR_FULL_RESOLUTION_1)\r
+#define PMEM_CAM_FULL_RESOLUTION   PMEM_SENSOR_FULL_RESOLUTION_0\r
+#else\r
+#define PMEM_CAM_FULL_RESOLUTION   PMEM_SENSOR_FULL_RESOLUTION_1\r
+#endif\r
+\r
+#if (PMEM_CAM_FULL_RESOLUTION == 0x500000)\r
 #define PMEM_CAM_NECESSARY   0x1200000       /* 1280*720*1.5*4(preview) + 7.5M(capture raw) + 4M(jpeg encode output) */\r
-#elif (PMEM_CAM_FULL_RESOLUTION == 0x300000)
+#elif (PMEM_CAM_FULL_RESOLUTION == 0x300000)\r
 #define PMEM_CAM_NECESSARY   0xe00000        /* 1280*720*1.5*4(preview) + 4.5M(capture raw) + 3M(jpeg encode output) */\r
 #elif (PMEM_CAM_FULL_RESOLUTION == 0x200000) /* 1280*720*1.5*4(preview) + 3M(capture raw) + 3M(jpeg encode output) */\r
 #define PMEM_CAM_NECESSARY   0xc00000\r
-#elif ((PMEM_CAM_FULL_RESOLUTION == 0x100000) || (PMEM_CAM_FULL_RESOLUTION == 0x130000))
+#elif ((PMEM_CAM_FULL_RESOLUTION == 0x100000) || (PMEM_CAM_FULL_RESOLUTION == 0x130000))\r
 #define PMEM_CAM_NECESSARY   0x800000        /* 800*600*1.5*4(preview) + 2M(capture raw) + 2M(jpeg encode output) */\r
 #elif (PMEM_CAM_FULL_RESOLUTION == 0x30000)\r
 #define PMEM_CAM_NECESSARY   0x400000        /* 640*480*1.5*4(preview) + 1M(capture raw) + 1M(jpeg encode output) */\r
 #endif\r
 #else   // #ifdef PMEM_CAM_SIZE\r
 \r
-/*****************************************************************************************
- * camera  devices
- * author: ddl@rock-chips.com
+/*****************************************************************************************\r
+ * camera  devices\r
+ * author: ddl@rock-chips.com\r
  *****************************************************************************************/\r
 #ifdef CONFIG_VIDEO_RK29 \r
 static int camera_debug;\r
 module_param(camera_debug, int, S_IRUGO|S_IWUSR);\r
-
+\r
 #define ddprintk(level, fmt, arg...) do {                      \\r
        if (camera_debug >= level)                                      \\r
            printk(KERN_WARNING"rk29_cam_io: " fmt , ## arg); } while (0)\r
 \r
 #define dprintk(format, ...) ddprintk(1, format, ## __VA_ARGS__)    \r
 \r
-#define SENSOR_NAME_0 STR(CONFIG_SENSOR_0)                     /* back camera sensor */
-#define SENSOR_NAME_1 STR(CONFIG_SENSOR_1)                     /* front camera sensor */
-#define SENSOR_DEVICE_NAME_0  STR(CONS(CONFIG_SENSOR_0, _back))
-#define SENSOR_DEVICE_NAME_1  STR(CONS(CONFIG_SENSOR_1, _front))
-
-static int rk29_sensor_io_init(void);
-static int rk29_sensor_io_deinit(int sensor);
-static int rk29_sensor_ioctrl(struct device *dev,enum rk29camera_ioctrl_cmd cmd,int on);
-
+#define SENSOR_NAME_0 STR(CONFIG_SENSOR_0)                     /* back camera sensor */\r
+#define SENSOR_NAME_1 STR(CONFIG_SENSOR_1)                     /* front camera sensor */\r
+#define SENSOR_DEVICE_NAME_0  STR(CONS(CONFIG_SENSOR_0, _back))\r
+#define SENSOR_DEVICE_NAME_1  STR(CONS(CONFIG_SENSOR_1, _front))\r
+\r
+static int rk29_sensor_io_init(void);\r
+static int rk29_sensor_io_deinit(int sensor);\r
+static int rk29_sensor_ioctrl(struct device *dev,enum rk29camera_ioctrl_cmd cmd,int on);\r
+\r
 static struct rk29camera_platform_data rk29_camera_platform_data = {\r
-    .io_init = rk29_sensor_io_init,
-    .io_deinit = rk29_sensor_io_deinit,
-    .sensor_ioctrl = rk29_sensor_ioctrl,
-    .gpio_res = {
-        {
-            .gpio_reset = CONFIG_SENSOR_RESET_PIN_0,
-            .gpio_power = CONFIG_SENSOR_POWER_PIN_0,
-            .gpio_powerdown = CONFIG_SENSOR_POWERDN_PIN_0,
-            .gpio_flash = CONFIG_SENSOR_FALSH_PIN_0,
-            .gpio_flag = (CONFIG_SENSOR_POWERACTIVE_LEVEL_0|CONFIG_SENSOR_RESETACTIVE_LEVEL_0|CONFIG_SENSOR_POWERDNACTIVE_LEVEL_0|CONFIG_SENSOR_FLASHACTIVE_LEVEL_0),
-            .gpio_init = 0,
-            .dev_name = SENSOR_DEVICE_NAME_0,
-        }, {
-            .gpio_reset = CONFIG_SENSOR_RESET_PIN_1,
-            .gpio_power = CONFIG_SENSOR_POWER_PIN_1,
-            .gpio_powerdown = CONFIG_SENSOR_POWERDN_PIN_1,
-            .gpio_flash = CONFIG_SENSOR_FALSH_PIN_1,
-            .gpio_flag = (CONFIG_SENSOR_POWERACTIVE_LEVEL_1|CONFIG_SENSOR_RESETACTIVE_LEVEL_1|CONFIG_SENSOR_POWERDNACTIVE_LEVEL_1|CONFIG_SENSOR_FLASHACTIVE_LEVEL_1),
-            .gpio_init = 0,
-            .dev_name = SENSOR_DEVICE_NAME_1,
-        }
-    },
-       #ifdef CONFIG_VIDEO_RK29_WORK_IPP
-       .meminfo = {
-           .name  = "camera_ipp_mem",
-               .start = MEM_CAMIPP_BASE,
-               .size   = MEM_CAMIPP_SIZE,
-       }
-       #endif
+    .io_init = rk29_sensor_io_init,\r
+    .io_deinit = rk29_sensor_io_deinit,\r
+    .sensor_ioctrl = rk29_sensor_ioctrl,\r
+    .gpio_res = {\r
+        {\r
+            .gpio_reset = CONFIG_SENSOR_RESET_PIN_0,\r
+            .gpio_power = CONFIG_SENSOR_POWER_PIN_0,\r
+            .gpio_powerdown = CONFIG_SENSOR_POWERDN_PIN_0,\r
+            .gpio_flash = CONFIG_SENSOR_FALSH_PIN_0,\r
+            .gpio_flag = (CONFIG_SENSOR_POWERACTIVE_LEVEL_0|CONFIG_SENSOR_RESETACTIVE_LEVEL_0|CONFIG_SENSOR_POWERDNACTIVE_LEVEL_0|CONFIG_SENSOR_FLASHACTIVE_LEVEL_0),\r
+            .gpio_init = 0,\r
+            .dev_name = SENSOR_DEVICE_NAME_0,\r
+        }, {\r
+            .gpio_reset = CONFIG_SENSOR_RESET_PIN_1,\r
+            .gpio_power = CONFIG_SENSOR_POWER_PIN_1,\r
+            .gpio_powerdown = CONFIG_SENSOR_POWERDN_PIN_1,\r
+            .gpio_flash = CONFIG_SENSOR_FALSH_PIN_1,\r
+            .gpio_flag = (CONFIG_SENSOR_POWERACTIVE_LEVEL_1|CONFIG_SENSOR_RESETACTIVE_LEVEL_1|CONFIG_SENSOR_POWERDNACTIVE_LEVEL_1|CONFIG_SENSOR_FLASHACTIVE_LEVEL_1),\r
+            .gpio_init = 0,\r
+            .dev_name = SENSOR_DEVICE_NAME_1,\r
+        }\r
+    },\r
+       #ifdef CONFIG_VIDEO_RK29_WORK_IPP\r
+       .meminfo = {\r
+           .name  = "camera_ipp_mem",\r
+               .start = MEM_CAMIPP_BASE,\r
+               .size   = MEM_CAMIPP_SIZE,\r
+       }\r
+       #endif\r
 };\r
 \r
-
+\r
 \r
 static int sensor_power_default_cb (struct rk29camera_gpio_res *res, int on)\r
 {\r
@@ -121,7 +121,7 @@ static int sensor_power_default_cb (struct rk29camera_gpio_res *res, int on)
     int ret = 0;\r
     \r
     if (camera_power != INVALID_GPIO)  {\r
-        if (camera_io_init & RK29_CAM_POWERACTIVE_MASK) {\r
+                    if (camera_io_init & RK29_CAM_POWERACTIVE_MASK) {\r
             if (on) {\r
                gpio_set_value(camera_power, ((camera_ioflag&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));\r
                        dprintk("\n%s..%s..PowerPin=%d ..PinLevel = %x   \n",__FUNCTION__,res->dev_name, camera_power, ((camera_ioflag&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));\r
@@ -142,7 +142,7 @@ static int sensor_power_default_cb (struct rk29camera_gpio_res *res, int on)
 }\r
 \r
 static int sensor_reset_default_cb (struct rk29camera_gpio_res *res, int on)\r
-{
+{\r
     int camera_reset = res->gpio_reset;\r
     int camera_ioflag = res->gpio_flag;\r
     int camera_io_init = res->gpio_init;  \r
@@ -166,10 +166,10 @@ static int sensor_reset_default_cb (struct rk29camera_gpio_res *res, int on)
     }\r
 \r
     return ret;\r
-}
+}\r
 \r
 static int sensor_powerdown_default_cb (struct rk29camera_gpio_res *res, int on)\r
-{
+{\r
     int camera_powerdown = res->gpio_powerdown;\r
     int camera_ioflag = res->gpio_flag;\r
     int camera_io_init = res->gpio_init;  \r
@@ -192,9 +192,9 @@ static int sensor_powerdown_default_cb (struct rk29camera_gpio_res *res, int on)
                ret = RK29_CAM_EIO_INVALID;\r
     }\r
     return ret;\r
-}
+}\r
+\r
 \r
-
 static int sensor_flash_default_cb (struct rk29camera_gpio_res *res, int on)\r
 {\r
     int camera_flash = res->gpio_flash;\r
@@ -243,13 +243,13 @@ static int sensor_flash_default_cb (struct rk29camera_gpio_res *res, int on)
     return ret;\r
 }\r
 \r
-
-static int rk29_sensor_io_init(void)
-{
-    int ret = 0, i;
-    unsigned int camera_reset = INVALID_GPIO, camera_power = INVALID_GPIO;
-       unsigned int camera_powerdown = INVALID_GPIO, camera_flash = INVALID_GPIO;
-       unsigned int camera_ioflag;
+\r
+static int rk29_sensor_io_init(void)\r
+{\r
+    int ret = 0, i;\r
+    unsigned int camera_reset = INVALID_GPIO, camera_power = INVALID_GPIO;\r
+       unsigned int camera_powerdown = INVALID_GPIO, camera_flash = INVALID_GPIO;\r
+       unsigned int camera_ioflag;\r
 \r
     if (sensor_ioctl_cb.sensor_power_cb == NULL)\r
         sensor_ioctl_cb.sensor_power_cb = sensor_power_default_cb;\r
@@ -260,297 +260,298 @@ static int rk29_sensor_io_init(void)
     if (sensor_ioctl_cb.sensor_flash_cb == NULL)\r
         sensor_ioctl_cb.sensor_flash_cb = sensor_flash_default_cb;\r
     \r
-    for (i=0; i<2; i++) {
-        camera_reset = rk29_camera_platform_data.gpio_res[i].gpio_reset;
-        camera_power = rk29_camera_platform_data.gpio_res[i].gpio_power;
-               camera_powerdown = rk29_camera_platform_data.gpio_res[i].gpio_powerdown;
-        camera_flash = rk29_camera_platform_data.gpio_res[i].gpio_flash;
-               camera_ioflag = rk29_camera_platform_data.gpio_res[i].gpio_flag;
-               rk29_camera_platform_data.gpio_res[i].gpio_init = 0;
-
-        if (camera_power != INVALID_GPIO) {
-            ret = gpio_request(camera_power, "camera power");
-            if (ret) {
+    for (i=0; i<2; i++) {\r
+        camera_reset = rk29_camera_platform_data.gpio_res[i].gpio_reset;\r
+        camera_power = rk29_camera_platform_data.gpio_res[i].gpio_power;\r
+               camera_powerdown = rk29_camera_platform_data.gpio_res[i].gpio_powerdown;\r
+        camera_flash = rk29_camera_platform_data.gpio_res[i].gpio_flash;\r
+               camera_ioflag = rk29_camera_platform_data.gpio_res[i].gpio_flag;\r
+               rk29_camera_platform_data.gpio_res[i].gpio_init = 0;\r
+\r
+        if (camera_power != INVALID_GPIO) {\r
+            ret = gpio_request(camera_power, "camera power");\r
+            if (ret) {\r
                 if (i == 0) {\r
-                                   goto sensor_io_int_loop_end;
+                                   goto sensor_io_int_loop_end;\r
                 } else {\r
                     if (camera_power != rk29_camera_platform_data.gpio_res[0].gpio_power)\r
                         goto sensor_io_int_loop_end;\r
                 }\r
             }\r
-                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_POWERACTIVE_MASK;
-            gpio_set_value(camera_reset, (((~camera_ioflag)&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));
-            gpio_direction_output(camera_power, (((~camera_ioflag)&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));
-
-                       dprintk("\n%s....power pin(%d) init success(0x%x)  \n",__FUNCTION__,camera_power,(((~camera_ioflag)&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));\r
-
-        }
-
-        if (camera_reset != INVALID_GPIO) {
-            ret = gpio_request(camera_reset, "camera reset");
-            if (ret)
-                               goto sensor_io_int_loop_end;
-                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_RESETACTIVE_MASK;
-            gpio_set_value(camera_reset, ((camera_ioflag&RK29_CAM_RESETACTIVE_MASK)>>RK29_CAM_RESETACTIVE_BITPOS));
-            gpio_direction_output(camera_reset, ((camera_ioflag&RK29_CAM_RESETACTIVE_MASK)>>RK29_CAM_RESETACTIVE_BITPOS));
-
+\r
+                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_POWERACTIVE_MASK;\r
+            gpio_set_value(camera_reset, (((~camera_ioflag)&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));\r
+            gpio_direction_output(camera_power, (((~camera_ioflag)&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));\r
+\r
+                       printk("\n%s....power pin(%d) init success(0x%x)  \n",__FUNCTION__,camera_power,(((~camera_ioflag)&RK29_CAM_POWERACTIVE_MASK)>>RK29_CAM_POWERACTIVE_BITPOS));\r
+\r
+        }\r
+\r
+        if (camera_reset != INVALID_GPIO) {\r
+            ret = gpio_request(camera_reset, "camera reset");\r
+            if (ret)\r
+                               goto sensor_io_int_loop_end;\r
+                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_RESETACTIVE_MASK;\r
+            gpio_set_value(camera_reset, ((camera_ioflag&RK29_CAM_RESETACTIVE_MASK)>>RK29_CAM_RESETACTIVE_BITPOS));\r
+            gpio_direction_output(camera_reset, ((camera_ioflag&RK29_CAM_RESETACTIVE_MASK)>>RK29_CAM_RESETACTIVE_BITPOS));\r
+\r
                        dprintk("\n%s....reset pin(%d) init success(0x%x)\n",__FUNCTION__,camera_reset,((camera_ioflag&RK29_CAM_RESETACTIVE_MASK)>>RK29_CAM_RESETACTIVE_BITPOS));\r
-
-        }
-
-               if (camera_powerdown != INVALID_GPIO) {
-            ret = gpio_request(camera_powerdown, "camera powerdown");
-            if (ret)
-                               goto sensor_io_int_loop_end;
-                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_POWERDNACTIVE_MASK;
-            gpio_set_value(camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));
-            gpio_direction_output(camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));
-
-                       dprintk("\n%s....powerdown pin(%d) init success(0x%x) \n",__FUNCTION__,camera_powerdown,((camera_ioflag&RK29_CAM_POWERDNACTIVE_BITPOS)>>RK29_CAM_POWERDNACTIVE_BITPOS));\r
-
-        }
-
-               if (camera_flash != INVALID_GPIO) {
-            ret = gpio_request(camera_flash, "camera flash");
-            if (ret)
-                               goto sensor_io_int_loop_end;
-                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_FLASHACTIVE_MASK;
+\r
+        }\r
+\r
+               if (camera_powerdown != INVALID_GPIO) {\r
+            ret = gpio_request(camera_powerdown, "camera powerdown");\r
+            if (ret)\r
+                               goto sensor_io_int_loop_end;\r
+                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_POWERDNACTIVE_MASK;\r
+            gpio_set_value(camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));\r
+            gpio_direction_output(camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));\r
+\r
+                       printk("\n%s....powerdown pin(%d) init success(0x%x) \n",__FUNCTION__,camera_powerdown,((camera_ioflag&RK29_CAM_POWERDNACTIVE_BITPOS)>>RK29_CAM_POWERDNACTIVE_BITPOS));\r
+\r
+        }\r
+\r
+               if (camera_flash != INVALID_GPIO) {\r
+            ret = gpio_request(camera_flash, "camera flash");\r
+            if (ret)\r
+                               goto sensor_io_int_loop_end;\r
+                       rk29_camera_platform_data.gpio_res[i].gpio_init |= RK29_CAM_FLASHACTIVE_MASK;\r
             gpio_set_value(camera_flash, ((~camera_ioflag&RK29_CAM_FLASHACTIVE_MASK)>>RK29_CAM_FLASHACTIVE_BITPOS));    /* falsh off */\r
             gpio_direction_output(camera_flash, ((~camera_ioflag&RK29_CAM_FLASHACTIVE_MASK)>>RK29_CAM_FLASHACTIVE_BITPOS));\r
-
+\r
                        dprintk("\n%s....flash pin(%d) init success(0x%x) \n",__FUNCTION__,camera_flash,((camera_ioflag&RK29_CAM_FLASHACTIVE_MASK)>>RK29_CAM_FLASHACTIVE_BITPOS));\r
-
-        }
-               continue;
-sensor_io_int_loop_end:
-               rk29_sensor_io_deinit(i);
-               continue;
-    }
-
-    return 0;
-}
-
-static int rk29_sensor_io_deinit(int sensor)
-{
-    unsigned int camera_reset = INVALID_GPIO, camera_power = INVALID_GPIO;
-       unsigned int camera_powerdown = INVALID_GPIO, camera_flash = INVALID_GPIO;
-
-    camera_reset = rk29_camera_platform_data.gpio_res[sensor].gpio_reset;
-    camera_power = rk29_camera_platform_data.gpio_res[sensor].gpio_power;
-       camera_powerdown = rk29_camera_platform_data.gpio_res[sensor].gpio_powerdown;
-    camera_flash = rk29_camera_platform_data.gpio_res[sensor].gpio_flash;
-
-       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_POWERACTIVE_MASK) {
-           if (camera_power != INVALID_GPIO) {
-               gpio_direction_input(camera_power);
-               gpio_free(camera_power);
-           }
-       }
-
-       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_RESETACTIVE_MASK) {
-           if (camera_reset != INVALID_GPIO)  {
-               gpio_direction_input(camera_reset);
-               gpio_free(camera_reset);
-           }
-       }
-
-       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_POWERDNACTIVE_MASK) {
-           if (camera_powerdown != INVALID_GPIO)  {
-               gpio_direction_input(camera_powerdown);
-               gpio_free(camera_powerdown);
-           }
-       }
-
-       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_FLASHACTIVE_MASK) {
-           if (camera_flash != INVALID_GPIO)  {
-               gpio_direction_input(camera_flash);
-               gpio_free(camera_flash);
-           }
-       }
-
-       rk29_camera_platform_data.gpio_res[sensor].gpio_init = 0;
-    return 0;
-}
-static int rk29_sensor_ioctrl(struct device *dev,enum rk29camera_ioctrl_cmd cmd, int on)
-{
+\r
+        }\r
+               continue;\r
+sensor_io_int_loop_end:\r
+               rk29_sensor_io_deinit(i);\r
+               continue;\r
+    }\r
+\r
+    return 0;\r
+}\r
+\r
+static int rk29_sensor_io_deinit(int sensor)\r
+{\r
+    unsigned int camera_reset = INVALID_GPIO, camera_power = INVALID_GPIO;\r
+       unsigned int camera_powerdown = INVALID_GPIO, camera_flash = INVALID_GPIO;\r
+\r
+    camera_reset = rk29_camera_platform_data.gpio_res[sensor].gpio_reset;\r
+    camera_power = rk29_camera_platform_data.gpio_res[sensor].gpio_power;\r
+       camera_powerdown = rk29_camera_platform_data.gpio_res[sensor].gpio_powerdown;\r
+    camera_flash = rk29_camera_platform_data.gpio_res[sensor].gpio_flash;\r
+\r
+       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_POWERACTIVE_MASK) {\r
+           if (camera_power != INVALID_GPIO) {\r
+               gpio_direction_input(camera_power);\r
+               gpio_free(camera_power);\r
+           }\r
+       }\r
+\r
+       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_RESETACTIVE_MASK) {\r
+           if (camera_reset != INVALID_GPIO)  {\r
+               gpio_direction_input(camera_reset);\r
+               gpio_free(camera_reset);\r
+           }\r
+       }\r
+\r
+       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_POWERDNACTIVE_MASK) {\r
+           if (camera_powerdown != INVALID_GPIO)  {\r
+               gpio_direction_input(camera_powerdown);\r
+               gpio_free(camera_powerdown);\r
+           }\r
+       }\r
+\r
+       if (rk29_camera_platform_data.gpio_res[sensor].gpio_init & RK29_CAM_FLASHACTIVE_MASK) {\r
+           if (camera_flash != INVALID_GPIO)  {\r
+               gpio_direction_input(camera_flash);\r
+               gpio_free(camera_flash);\r
+           }\r
+       }\r
+\r
+       rk29_camera_platform_data.gpio_res[sensor].gpio_init = 0;\r
+    return 0;\r
+}\r
+static int rk29_sensor_ioctrl(struct device *dev,enum rk29camera_ioctrl_cmd cmd, int on)\r
+{\r
     struct rk29camera_gpio_res *res = NULL;    \r
-       int ret = RK29_CAM_IO_SUCCESS;
-
-    if(rk29_camera_platform_data.gpio_res[0].dev_name &&  (strcmp(rk29_camera_platform_data.gpio_res[0].dev_name, dev_name(dev)) == 0)) {
+       int ret = RK29_CAM_IO_SUCCESS;\r
+\r
+    if(rk29_camera_platform_data.gpio_res[0].dev_name &&  (strcmp(rk29_camera_platform_data.gpio_res[0].dev_name, dev_name(dev)) == 0)) {\r
                res = (struct rk29camera_gpio_res *)&rk29_camera_platform_data.gpio_res[0];\r
-    } else if (rk29_camera_platform_data.gpio_res[1].dev_name && (strcmp(rk29_camera_platform_data.gpio_res[1].dev_name, dev_name(dev)) == 0)) {
+    } else if (rk29_camera_platform_data.gpio_res[1].dev_name && (strcmp(rk29_camera_platform_data.gpio_res[1].dev_name, dev_name(dev)) == 0)) {\r
        res = (struct rk29camera_gpio_res *)&rk29_camera_platform_data.gpio_res[1];\r
     } else {\r
         printk(KERN_ERR "%s is not regisiterd in rk29_camera_platform_data!!\n",dev_name(dev));\r
         ret = RK29_CAM_EIO_INVALID;\r
         goto rk29_sensor_ioctrl_end;\r
     }\r
-
-       switch (cmd)
-       {
-               case Cam_Power:
-               {
+\r
+       switch (cmd)\r
+       {\r
+               case Cam_Power:\r
+               {\r
                        if (sensor_ioctl_cb.sensor_power_cb) {\r
                 ret = sensor_ioctl_cb.sensor_power_cb(res, on);\r
                        } else {\r
                 printk(KERN_ERR "sensor_ioctl_cb.sensor_power_cb is NULL");\r
                 WARN_ON(1);\r
                        }\r
-                       break;
-               }
-               case Cam_Reset:
-               {
+                       break;\r
+               }\r
+               case Cam_Reset:\r
+               {\r
                        if (sensor_ioctl_cb.sensor_reset_cb) {\r
                 ret = sensor_ioctl_cb.sensor_reset_cb(res, on);\r
                        } else {\r
                 printk(KERN_ERR "sensor_ioctl_cb.sensor_reset_cb is NULL");\r
                 WARN_ON(1);\r
                        }\r
-                       break;
-               }
-
-               case Cam_PowerDown:
-               {
+                       break;\r
+               }\r
+\r
+               case Cam_PowerDown:\r
+               {\r
                        if (sensor_ioctl_cb.sensor_powerdown_cb) {\r
                 ret = sensor_ioctl_cb.sensor_powerdown_cb(res, on);\r
                        } else {\r
                 printk(KERN_ERR "sensor_ioctl_cb.sensor_powerdown_cb is NULL");\r
                 WARN_ON(1);\r
                        }\r
-                       break;
-               }
-
-               case Cam_Flash:
-               {
+                       break;\r
+               }\r
+\r
+               case Cam_Flash:\r
+               {\r
                        if (sensor_ioctl_cb.sensor_flash_cb) {\r
                 ret = sensor_ioctl_cb.sensor_flash_cb(res, on);\r
                        } else {\r
                 printk(KERN_ERR "sensor_ioctl_cb.sensor_flash_cb is NULL!");\r
                 WARN_ON(1);\r
                        }\r
-                       break;
-               }
-
-               default:
-               {
-                       printk("%s cmd(0x%x) is unknown!\n",__FUNCTION__, cmd);
-                       break;
-               }
+                       break;\r
+               }\r
+\r
+               default:\r
+               {\r
+                       printk("%s cmd(0x%x) is unknown!\n",__FUNCTION__, cmd);\r
+                       break;\r
+               }\r
        }\r
 rk29_sensor_ioctrl_end:\r
-    return ret;
-}
-static int rk29_sensor_power(struct device *dev, int on)
-{
-       rk29_sensor_ioctrl(dev,Cam_Power,on);
-    return 0;
+    return ret;\r
+}\r
+static int rk29_sensor_power(struct device *dev, int on)\r
+{\r
+       rk29_sensor_ioctrl(dev,Cam_Power,on);\r
+    return 0;\r
 }\r
 #if 0\r
-static int rk29_sensor_reset(struct device *dev)
-{
-       rk29_sensor_ioctrl(dev,Cam_Reset,1);
-       msleep(2);
-       rk29_sensor_ioctrl(dev,Cam_Reset,0);
-       return 0;
+static int rk29_sensor_reset(struct device *dev)\r
+{\r
+       rk29_sensor_ioctrl(dev,Cam_Reset,1);\r
+       msleep(2);\r
+       rk29_sensor_ioctrl(dev,Cam_Reset,0);\r
+       return 0;\r
 }\r
 #endif\r
-static int rk29_sensor_powerdown(struct device *dev, int on)
-{
-       return rk29_sensor_ioctrl(dev,Cam_PowerDown,on);
-}
-#if (CONFIG_SENSOR_IIC_ADDR_0 != 0x00)
-static struct i2c_board_info rk29_i2c_cam_info_0[] = {
-       {
-               I2C_BOARD_INFO(SENSOR_NAME_0, CONFIG_SENSOR_IIC_ADDR_0>>1)
-       },
-};
-
-static struct soc_camera_link rk29_iclink_0 = {
-       .bus_id         = RK29_CAM_PLATFORM_DEV_ID,
-       .power          = rk29_sensor_power,
-       .powerdown  = rk29_sensor_powerdown,
-       .board_info     = &rk29_i2c_cam_info_0[0],
-       .i2c_adapter_id = CONFIG_SENSOR_IIC_ADAPTER_ID_0,
-       .module_name    = SENSOR_NAME_0,
-};
-
-/*platform_device : soc-camera need  */
-static struct platform_device rk29_soc_camera_pdrv_0 = {
-       .name   = "soc-camera-pdrv",
-       .id     = 0,
-       .dev    = {
-               .init_name = SENSOR_DEVICE_NAME_0,
-               .platform_data = &rk29_iclink_0,
-       },
-};
-#endif
-static struct i2c_board_info rk29_i2c_cam_info_1[] = {
-       {
-               I2C_BOARD_INFO(SENSOR_NAME_1, CONFIG_SENSOR_IIC_ADDR_1>>1)
-       },
-};
-
-static struct soc_camera_link rk29_iclink_1 = {
-       .bus_id         = RK29_CAM_PLATFORM_DEV_ID,
-       .power          = rk29_sensor_power,
-       .powerdown  = rk29_sensor_powerdown,
-       .board_info     = &rk29_i2c_cam_info_1[0],
-       .i2c_adapter_id = CONFIG_SENSOR_IIC_ADAPTER_ID_1,
-       .module_name    = SENSOR_NAME_1,
-};
-
-/*platform_device : soc-camera need  */
-static struct platform_device rk29_soc_camera_pdrv_1 = {
-       .name   = "soc-camera-pdrv",
-       .id     = 1,
-       .dev    = {
-               .init_name = SENSOR_DEVICE_NAME_1,
-               .platform_data = &rk29_iclink_1,
-       },
-};
-
-
-static u64 rockchip_device_camera_dmamask = 0xffffffffUL;
-static struct resource rk29_camera_resource[] = {
-       [0] = {
-               .start = RK29_VIP_PHYS,
-               .end   = RK29_VIP_PHYS + RK29_VIP_SIZE - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = IRQ_VIP,
-               .end   = IRQ_VIP,
-               .flags = IORESOURCE_IRQ,
-       }
-};
-
-/*platform_device : */
-static struct platform_device rk29_device_camera = {
-       .name             = RK29_CAM_DRV_NAME,
-       .id               = RK29_CAM_PLATFORM_DEV_ID,               /* This is used to put cameras on this interface */
-       .num_resources    = ARRAY_SIZE(rk29_camera_resource),
-       .resource         = rk29_camera_resource,
-       .dev            = {
-               .dma_mask = &rockchip_device_camera_dmamask,
-               .coherent_dma_mask = 0xffffffffUL,
-               .platform_data  = &rk29_camera_platform_data,
-       }
-};
-
-static struct android_pmem_platform_data android_pmem_cam_pdata = {
-       .name           = "pmem_cam",
-       .start          = PMEM_CAM_BASE,
-       .size           = PMEM_CAM_SIZE,
-       .no_allocator   = 1,
-       .cached         = 1,
-};
-
-static struct platform_device android_pmem_cam_device = {
-       .name           = "android_pmem",
-       .id             = 1,
-       .dev            = {
-               .platform_data = &android_pmem_cam_pdata,
-       },
+static int rk29_sensor_powerdown(struct device *dev, int on)\r
+{\r
+       return rk29_sensor_ioctrl(dev,Cam_PowerDown,on);\r
+}\r
+#if (CONFIG_SENSOR_IIC_ADDR_0 != 0x00)\r
+static struct i2c_board_info rk29_i2c_cam_info_0[] = {\r
+       {\r
+               I2C_BOARD_INFO(SENSOR_NAME_0, CONFIG_SENSOR_IIC_ADDR_0>>1)\r
+       },\r
+};\r
+\r
+static struct soc_camera_link rk29_iclink_0 = {\r
+       .bus_id         = RK29_CAM_PLATFORM_DEV_ID,\r
+       .power          = rk29_sensor_power,\r
+       .powerdown  = rk29_sensor_powerdown,\r
+       .board_info     = &rk29_i2c_cam_info_0[0],\r
+       .i2c_adapter_id = CONFIG_SENSOR_IIC_ADAPTER_ID_0,\r
+       .module_name    = SENSOR_NAME_0,\r
+};\r
+\r
+/*platform_device : soc-camera need  */\r
+static struct platform_device rk29_soc_camera_pdrv_0 = {\r
+       .name   = "soc-camera-pdrv",\r
+       .id     = 0,\r
+       .dev    = {\r
+               .init_name = SENSOR_DEVICE_NAME_0,\r
+               .platform_data = &rk29_iclink_0,\r
+       },\r
+};\r
+#endif\r
+static struct i2c_board_info rk29_i2c_cam_info_1[] = {\r
+       {\r
+               I2C_BOARD_INFO(SENSOR_NAME_1, CONFIG_SENSOR_IIC_ADDR_1>>1)\r
+       },\r
+};\r
+\r
+static struct soc_camera_link rk29_iclink_1 = {\r
+       .bus_id         = RK29_CAM_PLATFORM_DEV_ID,\r
+       .power          = rk29_sensor_power,\r
+       .powerdown  = rk29_sensor_powerdown,\r
+       .board_info     = &rk29_i2c_cam_info_1[0],\r
+       .i2c_adapter_id = CONFIG_SENSOR_IIC_ADAPTER_ID_1,\r
+       .module_name    = SENSOR_NAME_1,\r
+};\r
+\r
+/*platform_device : soc-camera need  */\r
+static struct platform_device rk29_soc_camera_pdrv_1 = {\r
+       .name   = "soc-camera-pdrv",\r
+       .id     = 1,\r
+       .dev    = {\r
+               .init_name = SENSOR_DEVICE_NAME_1,\r
+               .platform_data = &rk29_iclink_1,\r
+       },\r
+};\r
+\r
+\r
+static u64 rockchip_device_camera_dmamask = 0xffffffffUL;\r
+static struct resource rk29_camera_resource[] = {\r
+       [0] = {\r
+               .start = RK29_VIP_PHYS,\r
+               .end   = RK29_VIP_PHYS + RK29_VIP_SIZE - 1,\r
+               .flags = IORESOURCE_MEM,\r
+       },\r
+       [1] = {\r
+               .start = IRQ_VIP,\r
+               .end   = IRQ_VIP,\r
+               .flags = IORESOURCE_IRQ,\r
+       }\r
+};\r
+\r
+/*platform_device : */\r
+static struct platform_device rk29_device_camera = {\r
+       .name             = RK29_CAM_DRV_NAME,\r
+       .id               = RK29_CAM_PLATFORM_DEV_ID,               /* This is used to put cameras on this interface */\r
+       .num_resources    = ARRAY_SIZE(rk29_camera_resource),\r
+       .resource         = rk29_camera_resource,\r
+       .dev            = {\r
+               .dma_mask = &rockchip_device_camera_dmamask,\r
+               .coherent_dma_mask = 0xffffffffUL,\r
+               .platform_data  = &rk29_camera_platform_data,\r
+       }\r
+};\r
+\r
+static struct android_pmem_platform_data android_pmem_cam_pdata = {\r
+       .name           = "pmem_cam",\r
+       .start          = PMEM_CAM_BASE,\r
+       .size           = PMEM_CAM_SIZE,\r
+       .no_allocator   = 1,\r
+       .cached         = 1,\r
+};\r
+\r
+static struct platform_device android_pmem_cam_device = {\r
+       .name           = "android_pmem",\r
+       .id             = 1,\r
+       .dev            = {\r
+               .platform_data = &android_pmem_cam_pdata,\r
+       },\r
 };\r
 \r
 #endif\r