/* and add WWDGT_COUNTER_MIN to this as a offset value.  */
static uint32_t gd32_wwdgt_calc_ticks(const struct device *dev, uint32_t timeout, uint32_t exp)
/* and add WWDGT_COUNTER_MIN to this as a offset value.  */
static uint32_t gd32_wwdgt_calc_ticks(const struct device *dev, uint32_t timeout, uint32_t exp)
{
	const struct gd32_wwdgt_config *config = dev->config;
	uint32_t pclk;
	(void)clock_control_get_rate(GD32_CLOCK_CONTROLLER,
				       (clock_control_subsys_t)&config->clkid,
				       &pclk);
	return ((timeout * pclk)
		/ (WWDGT_INTERNAL_DIVIDER * (1 << exp) * MSEC_PER_SEC) - 1)
		+ WWDGT_COUNTER_MIN;
}