/* During buffered input counter operation for e-series, the gate interrupt is acked automatically by the dma controller, due to the Gi_Read/Write_Acknowledges_IRQ bits in the input select register. */ static int should_ack_gate(struct ni_gpct *counter) { unsigned long flags; int retval = 0; switch (counter->counter_dev->variant) { case ni_gpct_variant_m_series: /* not sure if 660x really supports gate interrupts (the bits are not listed in register-level manual) */ case ni_gpct_variant_660x: return 1; break; case ni_gpct_variant_e_series: spin_lock_irqsave(&counter->lock, flags); { if (counter->mite_chan == NULL || counter->mite_chan->dir != COMEDI_INPUT || (mite_done(counter->mite_chan))) { retval = 1; } } spin_unlock_irqrestore(&counter->lock, flags); break; } return retval; }
static int should_ack_gate(struct ni_gpct *counter) { unsigned long flags; int retval = 0; switch (counter->counter_dev->variant) { case ni_gpct_variant_m_series: case ni_gpct_variant_660x: /* * not sure if 660x really supports gate interrupts * (the bits are not listed in register-level manual) */ return 1; case ni_gpct_variant_e_series: /* * During buffered input counter operation for e-series, * the gate interrupt is acked automatically by the dma * controller, due to the Gi_Read/Write_Acknowledges_IRQ * bits in the input select register. */ spin_lock_irqsave(&counter->lock, flags); { if (!counter->mite_chan || counter->mite_chan->dir != COMEDI_INPUT || (mite_done(counter->mite_chan))) { retval = 1; } } spin_unlock_irqrestore(&counter->lock, flags); break; } return retval; }
static int should_ack_gate(struct ni_gpct *counter) { unsigned long flags; int retval = 0; switch (counter->counter_dev->variant) { case ni_gpct_variant_m_series: /* */ case ni_gpct_variant_660x: return 1; break; case ni_gpct_variant_e_series: spin_lock_irqsave(&counter->lock, flags); { if (counter->mite_chan == NULL || counter->mite_chan->dir != COMEDI_INPUT || (mite_done(counter->mite_chan))) { retval = 1; } } spin_unlock_irqrestore(&counter->lock, flags); break; } return retval; }