diff options
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-reg.c | 14 | ||||
-rw-r--r-- | drivers/media/video/s5p-fimc/regs-fimc.h | 1 | ||||
-rw-r--r-- | include/media/s5p_fimc.h | 7 |
3 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/video/s5p-fimc/fimc-reg.c index 2a1ae51ad949..20e664e34163 100644 --- a/drivers/media/video/s5p-fimc/fimc-reg.c +++ b/drivers/media/video/s5p-fimc/fimc-reg.c | |||
@@ -533,20 +533,24 @@ int fimc_hw_set_camera_polarity(struct fimc_dev *fimc, | |||
533 | u32 cfg = readl(fimc->regs + S5P_CIGCTRL); | 533 | u32 cfg = readl(fimc->regs + S5P_CIGCTRL); |
534 | 534 | ||
535 | cfg &= ~(S5P_CIGCTRL_INVPOLPCLK | S5P_CIGCTRL_INVPOLVSYNC | | 535 | cfg &= ~(S5P_CIGCTRL_INVPOLPCLK | S5P_CIGCTRL_INVPOLVSYNC | |
536 | S5P_CIGCTRL_INVPOLHREF | S5P_CIGCTRL_INVPOLHSYNC); | 536 | S5P_CIGCTRL_INVPOLHREF | S5P_CIGCTRL_INVPOLHSYNC | |
537 | S5P_CIGCTRL_INVPOLFIELD); | ||
537 | 538 | ||
538 | if (cam->flags & FIMC_CLK_INV_PCLK) | 539 | if (cam->flags & V4L2_MBUS_PCLK_SAMPLE_FALLING) |
539 | cfg |= S5P_CIGCTRL_INVPOLPCLK; | 540 | cfg |= S5P_CIGCTRL_INVPOLPCLK; |
540 | 541 | ||
541 | if (cam->flags & FIMC_CLK_INV_VSYNC) | 542 | if (cam->flags & V4L2_MBUS_VSYNC_ACTIVE_LOW) |
542 | cfg |= S5P_CIGCTRL_INVPOLVSYNC; | 543 | cfg |= S5P_CIGCTRL_INVPOLVSYNC; |
543 | 544 | ||
544 | if (cam->flags & FIMC_CLK_INV_HREF) | 545 | if (cam->flags & V4L2_MBUS_HSYNC_ACTIVE_LOW) |
545 | cfg |= S5P_CIGCTRL_INVPOLHREF; | 546 | cfg |= S5P_CIGCTRL_INVPOLHREF; |
546 | 547 | ||
547 | if (cam->flags & FIMC_CLK_INV_HSYNC) | 548 | if (cam->flags & V4L2_MBUS_HSYNC_ACTIVE_LOW) |
548 | cfg |= S5P_CIGCTRL_INVPOLHSYNC; | 549 | cfg |= S5P_CIGCTRL_INVPOLHSYNC; |
549 | 550 | ||
551 | if (cam->flags & V4L2_MBUS_FIELD_EVEN_LOW) | ||
552 | cfg |= S5P_CIGCTRL_INVPOLFIELD; | ||
553 | |||
550 | writel(cfg, fimc->regs + S5P_CIGCTRL); | 554 | writel(cfg, fimc->regs + S5P_CIGCTRL); |
551 | 555 | ||
552 | return 0; | 556 | return 0; |
diff --git a/drivers/media/video/s5p-fimc/regs-fimc.h b/drivers/media/video/s5p-fimc/regs-fimc.h index 94d2302698a9..c8e3b94bd91d 100644 --- a/drivers/media/video/s5p-fimc/regs-fimc.h +++ b/drivers/media/video/s5p-fimc/regs-fimc.h | |||
@@ -61,6 +61,7 @@ | |||
61 | #define S5P_CIGCTRL_CSC_ITU601_709 (1 << 5) | 61 | #define S5P_CIGCTRL_CSC_ITU601_709 (1 << 5) |
62 | #define S5P_CIGCTRL_INVPOLHSYNC (1 << 4) | 62 | #define S5P_CIGCTRL_INVPOLHSYNC (1 << 4) |
63 | #define S5P_CIGCTRL_SELCAM_MIPI (1 << 3) | 63 | #define S5P_CIGCTRL_SELCAM_MIPI (1 << 3) |
64 | #define S5P_CIGCTRL_INVPOLFIELD (1 << 1) | ||
64 | #define S5P_CIGCTRL_INTERLACE (1 << 0) | 65 | #define S5P_CIGCTRL_INTERLACE (1 << 0) |
65 | 66 | ||
66 | /* Window offset 2 */ | 67 | /* Window offset 2 */ |
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h index 2b589042588d..688fb3f1dc35 100644 --- a/include/media/s5p_fimc.h +++ b/include/media/s5p_fimc.h | |||
@@ -19,11 +19,6 @@ enum cam_bus_type { | |||
19 | FIMC_LCD_WB, /* FIFO link from LCD mixer */ | 19 | FIMC_LCD_WB, /* FIFO link from LCD mixer */ |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #define FIMC_CLK_INV_PCLK (1 << 0) | ||
23 | #define FIMC_CLK_INV_VSYNC (1 << 1) | ||
24 | #define FIMC_CLK_INV_HREF (1 << 2) | ||
25 | #define FIMC_CLK_INV_HSYNC (1 << 3) | ||
26 | |||
27 | struct i2c_board_info; | 22 | struct i2c_board_info; |
28 | 23 | ||
29 | /** | 24 | /** |
@@ -37,7 +32,7 @@ struct i2c_board_info; | |||
37 | * @i2c_bus_num: i2c control bus id the sensor is attached to | 32 | * @i2c_bus_num: i2c control bus id the sensor is attached to |
38 | * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) | 33 | * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) |
39 | * @clk_id: index of the SoC peripheral clock for sensors | 34 | * @clk_id: index of the SoC peripheral clock for sensors |
40 | * @flags: flags defining bus signals polarity inversion (High by default) | 35 | * @flags: the parallel bus flags defining signals polarity (V4L2_MBUS_*) |
41 | */ | 36 | */ |
42 | struct s5p_fimc_isp_info { | 37 | struct s5p_fimc_isp_info { |
43 | struct i2c_board_info *board_info; | 38 | struct i2c_board_info *board_info; |