/* All pwm signals generated from the same ctimer must have same period. To avoid this, we check if the new parameters will NOT change the period for a ctimer with active pulse channels  */
static bool mcux_ctimer_pwm_is_period_valid(struct pwm_mcux_ctimer_data *data, uint32_t new_pulse_channel, uint32_t new_period_cycles, uint32_t current_period_channel)
/* All pwm signals generated from the same ctimer must have same period. To avoid this, we check if the new parameters will NOT change the period for a ctimer with active pulse channels  */
static bool mcux_ctimer_pwm_is_period_valid(struct pwm_mcux_ctimer_data *data, uint32_t new_pulse_channel, uint32_t new_period_cycles, uint32_t current_period_channel)
{
	if (data->channel_states[current_period_channel].cycles == new_period_cycles) {
		return true;
	}
	if (data->num_active_pulse_chans == 0) {
		return true;
	}
	if (data->num_active_pulse_chans > 1) {
		return false;
	}
	if (data->channel_states[new_pulse_channel].role != PWM_CTIMER_CHANNEL_ROLE_PULSE) {
		return false;
	}
	return true;
}