diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-05-09 01:33:29 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-05-13 09:08:23 -0400 |
commit | 82a50195cbf1197b009d42c8430a4cab24ca1480 (patch) | |
tree | 92f3115449d8ac0ce1341aca754aa1cc626e7431 /drivers/video/exynos | |
parent | b89e1399bab8bf72762948d251e69df50a9d6d85 (diff) |
video: exynos mipi dsi: Properly interpret the interrupt source flags
Rework the interrupt handler so the RX_DONE, FIFO_EMPTY interrupts are
properly detected. This prevents missing the interrupts when there are
other bits set in the INTSRC register than just RX_DONE and FIFO_EMPTY.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/exynos')
-rw-r--r-- | drivers/video/exynos/exynos_mipi_dsi_common.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c index 99f645183759..47b533a183be 100644 --- a/drivers/video/exynos/exynos_mipi_dsi_common.c +++ b/drivers/video/exynos/exynos_mipi_dsi_common.c | |||
@@ -76,33 +76,25 @@ static unsigned int dpll_table[15] = { | |||
76 | 76 | ||
77 | irqreturn_t exynos_mipi_dsi_interrupt_handler(int irq, void *dev_id) | 77 | irqreturn_t exynos_mipi_dsi_interrupt_handler(int irq, void *dev_id) |
78 | { | 78 | { |
79 | unsigned int intsrc = 0; | 79 | struct mipi_dsim_device *dsim = dev_id; |
80 | unsigned int intmsk = 0; | 80 | unsigned int intsrc, intmsk; |
81 | struct mipi_dsim_device *dsim = NULL; | 81 | |
82 | 82 | if (dsim == NULL) { | |
83 | dsim = dev_id; | 83 | dev_err(dsim->dev, "%s: wrong parameter\n", __func__); |
84 | if (!dsim) { | 84 | return IRQ_NONE; |
85 | dev_dbg(dsim->dev, KERN_ERR "%s:error: wrong parameter\n", | ||
86 | __func__); | ||
87 | return IRQ_HANDLED; | ||
88 | } | 85 | } |
89 | 86 | ||
90 | intsrc = exynos_mipi_dsi_read_interrupt(dsim); | 87 | intsrc = exynos_mipi_dsi_read_interrupt(dsim); |
91 | intmsk = exynos_mipi_dsi_read_interrupt_mask(dsim); | 88 | intmsk = exynos_mipi_dsi_read_interrupt_mask(dsim); |
89 | intmsk = ~intmsk & intsrc; | ||
92 | 90 | ||
93 | intmsk = ~(intmsk) & intsrc; | 91 | if (intsrc & INTMSK_RX_DONE) { |
94 | |||
95 | switch (intmsk) { | ||
96 | case INTMSK_RX_DONE: | ||
97 | complete(&dsim_rd_comp); | 92 | complete(&dsim_rd_comp); |
98 | dev_dbg(dsim->dev, "MIPI INTMSK_RX_DONE\n"); | 93 | dev_dbg(dsim->dev, "MIPI INTMSK_RX_DONE\n"); |
99 | break; | 94 | } |
100 | case INTMSK_FIFO_EMPTY: | 95 | if (intsrc & INTMSK_FIFO_EMPTY) { |
101 | complete(&dsim_wr_comp); | 96 | complete(&dsim_wr_comp); |
102 | dev_dbg(dsim->dev, "MIPI INTMSK_FIFO_EMPTY\n"); | 97 | dev_dbg(dsim->dev, "MIPI INTMSK_FIFO_EMPTY\n"); |
103 | break; | ||
104 | default: | ||
105 | break; | ||
106 | } | 98 | } |
107 | 99 | ||
108 | exynos_mipi_dsi_clear_interrupt(dsim, intmsk); | 100 | exynos_mipi_dsi_clear_interrupt(dsim, intmsk); |