/*\r
* Driver Version Note\r
*v0.0.1: this driver is compatible with generic_sensor\r
+*v0.1.1:\r
+* Cam_Power return success in rk_sensor_ioctrl when power io havn't config;\r
*/\r
-static int camio_version = KERNEL_VERSION(0,1,0);\r
+static int camio_version = KERNEL_VERSION(0,1,1);\r
module_param(camio_version, int, S_IRUGO);\r
\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
+ ret = sensor_ioctl_cb.sensor_power_cb(res, on); \r
+ ret = (ret != RK29_CAM_EIO_INVALID)?ret:0; /* ddl@rock-chips.com: v0.1.1 */ \r
} else {\r
eprintk("sensor_ioctl_cb.sensor_power_cb is NULL");\r
WARN_ON(1);\r
*v0.0.1: this driver is compatible with generic_sensor\r
*v0.1.1:\r
* add sensor_focus_af_const_pause_usr_cb;\r
+*v0.1.3:\r
+* config sensor io H-Z in sensor_deactive_cb;\r
*/\r
-static int version = KERNEL_VERSION(0,1,1);\r
+static int version = KERNEL_VERSION(0,1,3);\r
module_param(version, int, S_IRUGO);\r
\r
\r
*/\r
static int sensor_deactivate_cb(struct i2c_client *client)\r
{\r
-\r
+ struct generic_sensor *sensor = to_generic_sensor(client);\r
+ \r
SENSOR_DG("%s",__FUNCTION__);\r
- \r
- \r
+ if (sensor->info_priv.funmodule_state & SENSOR_INIT_IS_OK) {\r
+ sensor_write(client, 0x3017, 0x00); // FREX,VSYNC,HREF,PCLK,D9-D6\r
+ sensor_write(client, 0x3018, 0x03); // D5-D0\r
+ sensor_write(client,0x3019,0x00); // STROBE,SDA\r
+ }\r
+ \r
return 0;\r
}\r
/*\r