Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i2c: tda998x: always disable and clear interrupts at probe

Always disable and clear interrupts at probe time to ensure that the
TDA998x is in a sane state. This ensures that the interrupt line,
which is also the CEC clock calibration signal, is always deasserted.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

+9 -5
+9 -5
drivers/gpu/drm/i2c/tda998x_drv.c
··· 1546 1546 cec_write(priv, REG_CEC_FRO_IM_CLK_CTRL, 1547 1547 CEC_FRO_IM_CLK_CTRL_GHOST_DIS | CEC_FRO_IM_CLK_CTRL_IMCLK_SEL); 1548 1548 1549 + /* ensure interrupts are disabled */ 1550 + cec_write(priv, REG_CEC_RXSHPDINTENA, 0); 1551 + 1552 + /* clear pending interrupts */ 1553 + cec_read(priv, REG_CEC_RXSHPDINT); 1554 + reg_read(priv, REG_INT_FLAGS_0); 1555 + reg_read(priv, REG_INT_FLAGS_1); 1556 + reg_read(priv, REG_INT_FLAGS_2); 1557 + 1549 1558 /* initialize the optional IRQ */ 1550 1559 if (client->irq) { 1551 1560 unsigned long irq_flags; 1552 1561 1553 1562 /* init read EDID waitqueue and HDP work */ 1554 1563 init_waitqueue_head(&priv->wq_edid); 1555 - 1556 - /* clear pending interrupts */ 1557 - reg_read(priv, REG_INT_FLAGS_0); 1558 - reg_read(priv, REG_INT_FLAGS_1); 1559 - reg_read(priv, REG_INT_FLAGS_2); 1560 1564 1561 1565 irq_flags = 1562 1566 irqd_get_trigger_type(irq_get_irq_data(client->irq));