@@ -987,16 +987,20 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
...
@@ -987,16 +987,20 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
///< be applied to, negative - ASAP
///< be applied to, negative - ASAP
///< @return 0 - OK, negative - error
///< @return 0 - OK, negative - error
{
{
// unsigned long flags; // this function uses software i2c operations - they need to have interrupts (and hardware i2c off)
// struct frameparspair_t pars_to_update[258+(MAX_SENSORS * P_MULTI_NUMREGS )]; // for all the sensor registers. Other P_* values will reuse the same ones
// unsigned long flags; // this function uses software i2c operations - they need to have interrupts (and hardware i2c off)
// NOTE: pars_to_update - is allocated in the stack, is it too huge?
// struct frameparspair_t pars_to_update[258+(MAX_SENSORS * P_MULTI_NUMREGS )]; // for all the sensor registers. Other P_* values will reuse the same ones
structframeparspair_tpars_to_update[262+(MAX_SENSORS*P_MULTI_NUMREGS)];// for all the sensor registers. Other P_* values will reuse the same ones
structframeparspair_tpars_to_update[262+(MAX_SENSORS*P_MULTI_NUMREGS)];// for all the sensor registers. Other P_* values will reuse the same ones
intfirst_sensor_i2c;
intfirst_sensor_i2c;
unsignedshort*sensor_register_overwrites;
unsignedshort*sensor_register_overwrites;
x393_sensio_ctl_tsensio_ctl={.d32=0};
x393_sensio_ctl_tsensio_ctl={.d32=0};
// 09/05/2019: commented out, made regs read directly to sensor_reg_copy, otherwise get various kernel panics
// 09/09/2019: [256] - will create the variable in the stack,
// because of i2c_read_data_dw[256] array - huge variable in stack
// going heap with kmalloc
//u32 i2c_read_data_dw[256];
//u32 i2c_read_data_dw[256];
u32*i2c_read_data_dw;
intnupdate=0;
intnupdate=0;
inti,color;
inti,color;
...
@@ -1033,26 +1037,31 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
...
@@ -1033,26 +1037,31 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
}
}
dev_dbg(g_dev_ptr,"Reading sensor (port=%d) registers to the shadows, sa7=0x%x:\n",sensor_port,first_sensor_i2c);
dev_dbg(g_dev_ptr,"Reading sensor (port=%d) registers to the shadows, sa7=0x%x:\n",sensor_port,first_sensor_i2c);