/* Disable the specified interrupt triggering on the specified (UCB_RISING, UCB_FALLING or both) edges.  */
void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges)
/* Disable the specified interrupt triggering on the specified (UCB_RISING, UCB_FALLING or both) edges.  */
void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges)
{
	unsigned long flags;
	if (idx < 16) {
		spin_lock_irqsave(&ucb->lock, flags);
		ucb1x00_enable(ucb);
		if (edges & UCB_RISING) {
			ucb->irq_ris_enbl &= ~(1 << idx);
			ucb1x00_reg_write(ucb, UCB_IE_RIS, ucb->irq_ris_enbl);
		}
		if (edges & UCB_FALLING) {
			ucb->irq_fal_enbl &= ~(1 << idx);
			ucb1x00_reg_write(ucb, UCB_IE_FAL, ucb->irq_fal_enbl);
		}
		ucb1x00_disable(ucb);
		spin_unlock_irqrestore(&ucb->lock, flags);
	}
}