Add register verification logging and black-level correction diagnostics - Grayscale image verified working
This commit is contained in:
parent
9a586e13f0
commit
a2750dcd6e
17
sc235hai.c
17
sc235hai.c
|
|
@ -304,6 +304,8 @@ out:
|
|||
static int sc235hai_start_streaming(struct sc235hai *sc235hai)
|
||||
{
|
||||
int i, ret;
|
||||
u8 val;
|
||||
struct i2c_client *client = v4l2_get_subdevdata(&sc235hai->sd);
|
||||
|
||||
/* Apply mode settings */
|
||||
for (i = 0; i < sc235hai->cur_mode->num_regs; i++) {
|
||||
|
|
@ -314,6 +316,21 @@ static int sc235hai_start_streaming(struct sc235hai *sc235hai)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Verify critical exposure/gain registers */
|
||||
dev_info(&client->dev, "=== Verifying registers ===\n");
|
||||
|
||||
sc235hai_read_reg(sc235hai, 0x3e00, &val);
|
||||
dev_info(&client->dev, "0x3e00 = 0x%02x (expected 0x00)\n", val);
|
||||
|
||||
sc235hai_read_reg(sc235hai, 0x3e01, &val);
|
||||
dev_info(&client->dev, "0x3e01 = 0x%02x (expected 0x8b)\n", val);
|
||||
|
||||
sc235hai_read_reg(sc235hai, 0x3e02, &val);
|
||||
dev_info(&client->dev, "0x3e02 = 0x%02x (expected 0xf0)\n", val);
|
||||
|
||||
sc235hai_read_reg(sc235hai, 0x3e08, &val);
|
||||
dev_info(&client->dev, "0x3e08 = 0x%02x (expected 0x00)\n", val);
|
||||
|
||||
/* Enable streaming */
|
||||
ret = sc235hai_write_reg(sc235hai, SC235HAI_REG_MODE_SELECT,
|
||||
SC235HAI_MODE_STREAMING);
|
||||
|
|
|
|||
Loading…
Reference in New Issue