diff options
author | Javier Martin <javier.martin@vista-silicon.com> | 2013-01-29 07:26:38 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-08 14:35:06 -0200 |
commit | ee95258ed3926f3aa2cf8d62e62cd51be466fe26 (patch) | |
tree | c4ad96a07a767d8c475cfaceb16003e99648a08e /drivers/media/i2c | |
parent | 04ee6d92047e1ac68d4eb615119343f4f0fc57db (diff) | |
download | blackbird-op-linux-ee95258ed3926f3aa2cf8d62e62cd51be466fe26.tar.gz blackbird-op-linux-ee95258ed3926f3aa2cf8d62e62cd51be466fe26.zip |
[media] media: ov7670: Add possibility to disable pixclk during hblank
Some bridge drivers capture pixels during blanking periods if
pixclk is enabled. In order to avoid capturing bogus data we need to
disable pixclk in the sensor during those blanking periods.
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/ov7670.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 3e503396aaa4..52c024a334df 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -231,6 +231,7 @@ struct ov7670_info { u8 clkrc; /* Clock divider value */ bool use_smbus; /* Use smbus I/O instead of I2C */ bool pll_bypass; + bool pclk_hb_disable; const struct ov7670_devtype *devtype; /* Device specifics */ }; @@ -1712,6 +1713,9 @@ static int ov7670_probe(struct i2c_client *client, */ if (config->pll_bypass && id->driver_data != MODEL_OV7670) info->pll_bypass = true; + + if (config->pclk_hb_disable) + info->pclk_hb_disable = true; } /* Make sure it's an ov7670 */ @@ -1736,6 +1740,9 @@ static int ov7670_probe(struct i2c_client *client, tpf.denominator = 30; info->devtype->set_framerate(sd, &tpf); + if (info->pclk_hb_disable) + ov7670_write(sd, REG_COM10, COM10_PCLK_HB); + return 0; } |