aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/i2c/ov7670.c7
-rw-r--r--include/media/ov7670.h1
2 files changed, 8 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 {
231 u8 clkrc; /* Clock divider value */ 231 u8 clkrc; /* Clock divider value */
232 bool use_smbus; /* Use smbus I/O instead of I2C */ 232 bool use_smbus; /* Use smbus I/O instead of I2C */
233 bool pll_bypass; 233 bool pll_bypass;
234 bool pclk_hb_disable;
234 const struct ov7670_devtype *devtype; /* Device specifics */ 235 const struct ov7670_devtype *devtype; /* Device specifics */
235}; 236};
236 237
@@ -1712,6 +1713,9 @@ static int ov7670_probe(struct i2c_client *client,
1712 */ 1713 */
1713 if (config->pll_bypass && id->driver_data != MODEL_OV7670) 1714 if (config->pll_bypass && id->driver_data != MODEL_OV7670)
1714 info->pll_bypass = true; 1715 info->pll_bypass = true;
1716
1717 if (config->pclk_hb_disable)
1718 info->pclk_hb_disable = true;
1715 } 1719 }
1716 1720
1717 /* Make sure it's an ov7670 */ 1721 /* Make sure it's an ov7670 */
@@ -1736,6 +1740,9 @@ static int ov7670_probe(struct i2c_client *client,
1736 tpf.denominator = 30; 1740 tpf.denominator = 30;
1737 info->devtype->set_framerate(sd, &tpf); 1741 info->devtype->set_framerate(sd, &tpf);
1738 1742
1743 if (info->pclk_hb_disable)
1744 ov7670_write(sd, REG_COM10, COM10_PCLK_HB);
1745
1739 return 0; 1746 return 0;
1740} 1747}
1741 1748
diff --git a/include/media/ov7670.h b/include/media/ov7670.h
index a68c8bb3ceba..1913d5123072 100644
--- a/include/media/ov7670.h
+++ b/include/media/ov7670.h
@@ -16,6 +16,7 @@ struct ov7670_config {
16 int clock_speed; /* External clock speed (MHz) */ 16 int clock_speed; /* External clock speed (MHz) */
17 bool use_smbus; /* Use smbus I/O instead of I2C */ 17 bool use_smbus; /* Use smbus I/O instead of I2C */
18 bool pll_bypass; /* Choose whether to bypass the PLL */ 18 bool pll_bypass; /* Choose whether to bypass the PLL */
19 bool pclk_hb_disable; /* Disable toggling pixclk during horizontal blanking */
19}; 20};
20 21
21#endif 22#endif