#define INVALID_GPIO INVALID_VALUE
#endif
#define RK29_CAM_IO_SUCCESS 0
-#define RK29_CAM_EIO_INVALID -1
+#define RK29_CAM_EIO_INVALID -3
#define RK29_CAM_EIO_REQUESTFAIL -2
#define RK29_CAM_POWERACTIVE_BITPOS 0x00
*v0.1.3:\r
* 1. this version support fov configuration in new_camera_device;\r
* 2. Reduce delay time after power off or power down camera;\r
+*v0.1.5:\r
+* 1. if sensor power callback failed, power down sensor;\r
*/\r
-static int camio_version = KERNEL_VERSION(0,1,3);\r
+static int camio_version = KERNEL_VERSION(0,1,5);\r
module_param(camio_version, int, S_IRUGO);\r
\r
\r
eprintk("sensor_ioctl_cb.sensor_power_cb is NULL");\r
WARN_ON(1);\r
}\r
+\r
+ printk("ret: %d\n",ret);\r
break;\r
}\r
case Cam_Reset:\r
rk_sensor_pwrseq(dev, powerup_sequence, on,mclk_rate); \r
} else {\r
if (real_pwroff) {\r
- rk_sensor_pwrseq(dev, powerup_sequence, on,mclk_rate);\r
+ if (rk_sensor_pwrseq(dev, powerup_sequence, on,mclk_rate)<0) /* ddl@rock-chips.com: v0.1.5 */\r
+ goto PowerDown;\r
\r
/*ddl@rock-chips.com: all power down switch to Hi-Z after power off*/\r
for(i = 0;i < RK_CAM_NUM; i++) {\r
new_camera->pwdn_info |= 0x01;\r
new_camera++;\r
}\r
- } else { \r
+ } else { \r
+PowerDown:\r
rk_sensor_ioctrl(dev,Cam_PowerDown, !on);\r
\r
rk_sensor_ioctrl(dev,Cam_Mclk, 0);\r