/* This is a helper function to multiple functions in this module. */
static int32_t aiodio_reset_channel(struct aiodio_dev *dev, uint8_t chan_no)
/* This is a helper function to multiple functions in this module. */
static int32_t aiodio_reset_channel(struct aiodio_dev *dev, uint8_t chan_no)
{
	dev->board_device->channel_modes[chan_no] = CH_MODE_UNUSED;
	dev->board_device->channel_offstate[chan_no] = CH_OFFSTATE_PULLDOWN;
	dev->board_device->gpio_map &= ~BIT(chan_no);
	dev->board_device->gpio_in &= ~BIT(chan_no);
	dev->board_device->gpio_out &= ~BIT(chan_no);
	return ad5592r_set_channel_modes(dev->board_device);
}