/* Some interrupt flags need to be cleared for the controller to continue switching to sleep mode from the FD normal mode. */
int32_t can_ctrl_clear_int(struct can_ctrl_dev *dev)
/* Some interrupt flags need to be cleared for the controller to continue switching to sleep mode from the FD normal mode. */
int32_t can_ctrl_clear_int(struct can_ctrl_dev *dev)
{
	int32_t ret;
	uint32_t temp = 0;
	ret = can_ctrl_sfr_word_read(dev, CAN_CTRL_REG_INT, &temp);
	if(ret != 0)
		return ret;
	temp &= ~INT_IVMIF_MODE(WORD_MASK);
	temp &= ~INT_WAKIF_MODE(WORD_MASK);
	temp &= ~INT_CERRIF_MODE(WORD_MASK);
	temp &= ~INT_SERRIF_MODE(WORD_MASK);
	temp &= ~INT_MODIF_MODE(WORD_MASK);
	temp &= ~INT_TBCIF_MODE(WORD_MASK);
	return can_ctrl_sfr_word_write(dev, CAN_CTRL_REG_INT, temp);
}