#define SENSOR_TR(format, ...)
#endif
-#define SENSOR_BUS_PARAM (SOCAM_MASTER | SOCAM_PCLK_SAMPLE_RISING |\
+#define SENSOR_BUS_PARAM (SOCAM_MASTER | SOCAM_PCLK_SAMPLE_FALLING|\
SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW |\
SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATAWIDTH_8 |SOCAM_MCLK_24MHZ)
{0x3a14, 0x02},
{0x3a15, 0x28},
+ {0x4708,0x00},
{0x3623, 0x00},
{0x3634, 0x76},
{
int err, cnt;
int i = 0;
+ char val00;
cnt = 0;
while (regarray[i].reg != 0)
SENSOR_TR("%s..write array failed!!!\n", SENSOR_NAME_STRING());
return -EPERM;
}
+ } else {
+ sensor_read(client, regarray[i].reg, &val00);
+ if (val00 != regarray[i].val)
+ SENSOR_TR("%s Reg:0x%x write(0x%x, 0x%x) fail\n",SENSOR_NAME_STRING(), regarray[i].reg, regarray[i].val, val00);
}
i++;
}
SENSOR_DG("\n%s..%s.. \n",SENSOR_NAME_STRING(),__FUNCTION__);
/* soft reset */
- ret = sensor_write(client, 0x3012, 0x80);
+ ret = sensor_write(client, 0x0103, 0x01);
if (ret != 0)
{
SENSOR_TR("%s soft reset sensor failed\n",SENSOR_NAME_STRING());
{
struct i2c_client *client = sd->priv;
u8 reg_val;
+ int ret;
- SENSOR_DG("\n%s..%s.. \n",SENSOR_NAME_STRING(),__FUNCTION__);
+ ret = sensor_write(client, 0x0103, 0x01);
+ SENSOR_DG("\n%s..%s enter, reset ret:0x%x \n",SENSOR_NAME_STRING(),__FUNCTION__,ret);
+ msleep(5);
/* ddl@rock-chips.com : all sensor output pin must change to input for other sensor */
sensor_read(client,0x3000,®_val);
sensor_write(client, 0x3000, reg_val&0xfc);
return -ENODEV;
/* soft reset */
- ret = sensor_write(client, 0x3012, 0x80);
+ ret = sensor_write(client, 0x0103, 0x01);
if (ret != 0)
{
SENSOR_TR("soft reset %s failed\n",SENSOR_NAME_STRING());