*v0.1.3:\r
* add support flash control;\r
*\r
-*v0.1.5:\r
+*v0.1.5/v0.1.7:\r
* fix use v4l2_mbus_framefmt.reserved array overflow in generic_sensor_s_fmt; \r
*/\r
-static int version = KERNEL_VERSION(0,1,5);\r
+static int version = KERNEL_VERSION(0,1,7);\r
module_param(version, int, S_IRUGO);\r
\r
\r
{\r
struct i2c_client *client = v4l2_get_subdevdata(sd);\r
struct soc_camera_device *icd = client->dev.platform_data;\r
- const struct rk_sensor_datafmt *fmt;\r
+ const struct rk_sensor_datafmt *fmt=NULL;\r
struct generic_sensor *sensor = to_generic_sensor(client);\r
struct rk_sensor_sequence *winseqe_set_addr=NULL;\r
- struct sensor_v4l2ctrl_info_s *v4l2ctrl_info;\r
- bool is_capture=(mf->reserved[6]==0xfefe5a5a)?true:false; /* ddl@rock-chips.com : v0.1.5 */ \r
+ struct sensor_v4l2ctrl_info_s *v4l2ctrl_info=NULL;\r
+ bool is_capture=(mf->reserved[0]==0xfefe5a5a)?true:false; /* ddl@rock-chips.com : v0.1.5 */ \r
int ret=0;\r
\r
fmt =generic_sensor_find_datafmt(mf->code, sensor->info_priv.datafmt,\r
ret |= sensor->sensor_cb.sensor_s_fmt_cb_th(client, mf, is_capture);\r
\r
v4l2ctrl_info = sensor_find_ctrl(sensor->ctrls,V4L2_CID_FLASH); /* ddl@rock-chips.com: v0.1.3 */ \r
- if (v4l2ctrl_info) { \r
+ if (v4l2ctrl_info!=NULL) { \r
if (is_capture) { \r
if ((v4l2ctrl_info->cur_value == 2) || (v4l2ctrl_info->cur_value == 1)) {\r
generic_sensor_ioctrl(icd, Sensor_Flash, 1); \r
generic_sensor_ioctrl(icd, Sensor_Flash, 0); \r
}\r
}\r
- \r
+ \r
ret |= generic_sensor_write_array(client, winseqe_set_addr->data);\r
if (ret != 0) {\r
SENSOR_TR("set format capability failed");\r
{\r
struct i2c_client *client = v4l2_get_subdevdata(sd);\r
struct soc_camera_device *icd = client->dev.platform_data;\r
- struct generic_sensor*sensor = to_generic_sensor(client);\r
+ //struct generic_sensor*sensor = to_generic_sensor(client);\r
int i, error_cnt=0, error_idx=-1;\r
\r
\r
break;\r
}\r
\r
-set_end: \r
+//set_end: \r
if (sensor_work->wait == false) {\r
kfree((void*)sensor_work);\r
} else {\r
*v0.3.1 :
* 1. compatible with generic_sensor;
*
-*v0.3.3 :
+*v0.3.3 / v0.3.5:
* 1. fix use v4l2_mbus_framefmt.reserved array overflow in generic_sensor_s_fmt;
*/
-#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 3, 0x03)
+#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 3, 0x05)
static int version = RK_CAM_VERSION_CODE;
module_param(version, int, S_IRUGO);
stream_on = read_cif_reg(pcdev->base,CIF_CIF_CTRL);
if (stream_on & ENABLE_CAPTURE)
write_cif_reg(pcdev->base,CIF_CIF_CTRL, (stream_on & (~ENABLE_CAPTURE)));
-
+
mf.width = pix->width;
mf.height = pix->height;
mf.field = pix->field;
mf.colorspace = pix->colorspace;
mf.code = xlate->code;
- mf.reserved[6] = pix->priv; /* ddl@rock-chips.com : v0.3.3 */
+ mf.reserved[0] = pix->priv; /* ddl@rock-chips.com : v0.3.3 */
+
ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf);
if (mf.code != xlate->code)
return -EINVAL;