/* We can choose between IRQ based or polled IO. This needs to be called before omap_mcbsp_request().  */
int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type)
/* We can choose between IRQ based or polled IO. This needs to be called before omap_mcbsp_request().  */
int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type)
{
	struct omap_mcbsp *mcbsp;
	if (!omap_mcbsp_check_valid_id(id)) {
		printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
		return -ENODEV;
	}
	mcbsp = id_to_mcbsp_ptr(id);
	spin_lock(&mcbsp->lock);
	if (!mcbsp->free) {
		dev_err(mcbsp->dev, "McBSP%d is currently in use\n",
			mcbsp->id);
		spin_unlock(&mcbsp->lock);
		return -EINVAL;
	}
	mcbsp->io_type = io_type;
	spin_unlock(&mcbsp->lock);
	return 0;
}