/* Wait for MSTATUS bit to be set, and clear it afterwards, with time out.  */
static int mcux_i3c_status_wait_clear_timeout(I3C_Type *base, uint32_t mask, uint32_t init_delay_us, uint32_t step_delay_us, uint32_t total_delay_us)
/* Wait for MSTATUS bit to be set, and clear it afterwards, with time out.  */
static int mcux_i3c_status_wait_clear_timeout(I3C_Type *base, uint32_t mask, uint32_t init_delay_us, uint32_t step_delay_us, uint32_t total_delay_us)
{
	int ret;
	ret = mcux_i3c_status_wait_timeout(base, mask, init_delay_us,
					   step_delay_us, total_delay_us);
	if (ret != 0) {
		goto out;
	}
	ret = mcux_i3c_status_clear_timeout(base, mask, init_delay_us,
					    step_delay_us, total_delay_us);
out:
	return ret;
}