siihdmi: fix hotplug, don't printk in an interrupt routine, clear ISR sooner

This commit is contained in:
Matt Sealey
2011-01-27 10:57:58 -06:00
parent 2fee5c50ff
commit 6f9776c2ee

View File

@@ -904,7 +904,6 @@ static irqreturn_t siihdmi_irq_handler(int irq, void *dev_id)
{
struct siihdmi_tx *tx = ((struct siihdmi_tx *) dev_id);
DEBUG("hotplug event irq handled, scheduling hotplug work\n");
schedule_delayed_work(&tx->hotplug, msecs_to_jiffies(50));
return IRQ_HANDLED;
}
@@ -918,6 +917,9 @@ static void siihdmi_hotplug_event(struct work_struct *work)
data = i2c_smbus_read_byte_data(tx->client, SIIHDMI_TPI_REG_ISR);
/* clear ISR so the interrupt line goes down */
i2c_smbus_write_byte_data(tx->client, SIIHDMI_TPI_REG_ISR, data);
if (data & SIIHDMI_IER_HOT_PLUG_EVENT)
DEBUG("interrupt hot plug event\n");
@@ -942,8 +944,7 @@ static void siihdmi_hotplug_event(struct work_struct *work)
if (data & SIIHDMI_IER_HDCP_AUTHENTICATION_STATUS_CHANGE)
DEBUG("interrupt HDCP authentication status change\n");
// write 1 to every fired event, to clear it
i2c_smbus_write_byte_data(tx->client, SIIHDMI_TPI_REG_ISR, data);
/* once we handle the event, we should actually poll for new events here */
}
#endif