提交 c9f1f271 编写于 作者: M Martin Bugge 提交者: Mauro Carvalho Chehab

[media] adv7842: properly enable/disable the irqs

The method of disabling the irq-output pin caused many "empty"
interrupts. Instead, actually disable/enable the interrupts by
changing the interrupt masks.

Also enable STORE_MASKED_IRQ in INT1 configuration, otherwise when HDMI
events happen while the interrupt is masked those events will be ignored
when the interrupt is unmasked.
Signed-off-by: NMartin Bugge <marbugge@cisco.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 6251e65f
...@@ -1786,10 +1786,8 @@ static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled) ...@@ -1786,10 +1786,8 @@ static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
struct adv7842_state *state = to_state(sd); struct adv7842_state *state = to_state(sd);
u8 fmt_change_cp, fmt_change_digital, fmt_change_sdp; u8 fmt_change_cp, fmt_change_digital, fmt_change_sdp;
u8 irq_status[5]; u8 irq_status[5];
u8 irq_cfg = io_read(sd, 0x40);
/* disable irq-pin output */ adv7842_irq_enable(sd, false);
io_write(sd, 0x40, irq_cfg | 0x3);
/* read status */ /* read status */
irq_status[0] = io_read(sd, 0x43); irq_status[0] = io_read(sd, 0x43);
...@@ -1810,6 +1808,8 @@ static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled) ...@@ -1810,6 +1808,8 @@ static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
if (irq_status[4]) if (irq_status[4])
io_write(sd, 0x9e, irq_status[4]); io_write(sd, 0x9e, irq_status[4]);
adv7842_irq_enable(sd, true);
v4l2_dbg(1, debug, sd, "%s: irq %x, %x, %x, %x, %x\n", __func__, v4l2_dbg(1, debug, sd, "%s: irq %x, %x, %x, %x, %x\n", __func__,
irq_status[0], irq_status[1], irq_status[2], irq_status[0], irq_status[1], irq_status[2],
irq_status[3], irq_status[4]); irq_status[3], irq_status[4]);
...@@ -1845,9 +1845,6 @@ static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled) ...@@ -1845,9 +1845,6 @@ static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
if (handled) if (handled)
*handled = true; *handled = true;
/* re-enable irq-pin output */
io_write(sd, 0x40, irq_cfg);
return 0; return 0;
} }
...@@ -2446,7 +2443,7 @@ static int adv7842_core_init(struct v4l2_subdev *sd, ...@@ -2446,7 +2443,7 @@ static int adv7842_core_init(struct v4l2_subdev *sd,
io_write(sd, 0x33, 0x40); io_write(sd, 0x33, 0x40);
/* interrupts */ /* interrupts */
io_write(sd, 0x40, 0xe2); /* Configure INT1 */ io_write(sd, 0x40, 0xf2); /* Configure INT1 */
adv7842_irq_enable(sd, true); adv7842_irq_enable(sd, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册