/* there are only two g_out outputs. */
return -EINVAL;
reg = ni_get_gout_routing(dest, dev);
+ } else if (channel_is_ctr(dest)) {
+ reg = ni_tio_get_routing(devpriv->counter_dev, dest);
} else {
dev_dbg(dev->class_dev, "%s: unhandled destination (%d) queried\n",
__func__, dest);
return -EINVAL;
if (ni_set_gout_routing(src, dest, dev))
return -EINVAL;
+ } else if (channel_is_ctr(dest)) {
+ /*
+ * we are adding back the channel modifier info to set
+ * invert/edge info passed by the user
+ */
+ ni_tio_set_routing(devpriv->counter_dev, dest,
+ reg | (src & ~CR_CHAN(-1)));
} else {
return -EINVAL;
}
/* there are only two g_out outputs. */
return -EINVAL;
reg = ni_disable_gout_routing(dest, dev);
+ } else if (channel_is_ctr(dest)) {
+ ni_tio_unset_routing(devpriv->counter_dev, dest);
} else {
return -EINVAL;
}