Skip to content

Commit

Permalink
[wip] media: i2c: max96705: invert vsync
Browse files Browse the repository at this point in the history
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
  • Loading branch information
xlnx-hyunkwon committed Feb 22, 2020
1 parent 3ff8438 commit fe0b33b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions drivers/media/i2c/max96705.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#define MAX96705_CONFIG 0x07
#define MAX96705_CONFIG_HVEN BIT(2)
#define MAX96705_CONFIG_DBL BIT(7)
#define MAX96705_GPIO_EN 0x0e
#define MAX96705_GPIO_EN_GPIO_PIN(n) BIT(n)
#define MAX96705_CROSSBAR_VS 0x40
#define MAX96705_CROSSBAR_VS_INVERT_MUX_VS BIT(5)

/* Some default values */
#define MAX96705_I2C_ADDRESS 0x40
Expand Down Expand Up @@ -226,6 +226,18 @@ static int max96705_initialize(struct max96705_device *dev)
return ret;
msleep(8);

/*
* Invert VSYNC through cross-bar mux configuration.
* Note, this has to align between sensor and de-serializer.
* Don't distrupt bits other than of interest, bit 5.
*/
ret = max96705_write(dev, MAX96705_CROSSBAR_VS,
max96705_read(dev, MAX96705_CROSSBAR_VS) |
MAX96705_CROSSBAR_VS_INVERT_MUX_VS);
if (ret < 0)
return ret;
msleep(8);

ret = max96705_configure_address(dev, addr);
if (ret < 0)
return ret;
Expand Down

0 comments on commit fe0b33b

Please sign in to comment.