Exemplo n.º 1
0
irqreturn_t s5p_hpd_irq_handler(int irq)
{
	int ret = IRQ_HANDLED;
	unsigned long flags;

	spin_lock_irqsave(&hpd_struct.lock, flags);

	if (gpio_get_value(S5PV210_GPH1(5))) {

		if (irq_event == EVENT_FALLING) {
			mod_timer(&hpd_irq_check_timer, jiffies + HZ/20);
		}
		irq_event = EVENT_RISING;
	} else {
		irq_event =  EVENT_FALLING;
		del_timer(&hpd_irq_check_timer);
	}

	/* check HDMI status */
	if (atomic_read(&hdmi_status)) {
		/* HDMI on */
		ret = irq_hdmi(irq);
		HPDIFPRINTK("HDMI HPD interrupt\n");
	} else {
		/* HDMI off */
		ret = irq_eint(irq);
		HPDIFPRINTK("EINT HPD interrupt\n");
	}

	spin_unlock_irqrestore(&hpd_struct.lock, flags);

	return ret;
}
Exemplo n.º 2
0
/*
 * HPD interrupt handler
 *
 * Handles interrupt requests from HPD hardware.
 * Handler changes value of internal variable and notifies waiting thread.
 */
irqreturn_t s5p_hpd_irq_handler(int irq)
{
	int ret = IRQ_HANDLED;

	spin_lock_irq(&hpd_struct.lock);

	/* check HDMI status */
	if (atomic_read(&hdmi_status)) {
		/* HDMI on */
		ret = irq_hdmi(irq);
		HPDIFPRINTK("HDMI HPD interrupt\n");
	} else {
		/* HDMI off */
		ret = irq_eint(irq);
		HPDIFPRINTK("EINT HPD interrupt\n");
	}

	spin_unlock_irq(&hpd_struct.lock);

	return ret;
}