drivers: counter: Refactor drivers to use shared init priority

Refactors all of the counter drivers to use a shared driver class
initialization priority configuration, CONFIG_COUNTER_INIT_PRIORITY, to
allow configuring counter drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The
exceptions are the maxim_ds3231 and mcp7940n drivers which have a
dependency on a SPI driver and must therefore initialize later than the
default device priority.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
This commit is contained in:
Maureen Helm 2021-10-20 15:15:14 -05:00 committed by Anas Nashif
commit 165963c115
28 changed files with 33 additions and 38 deletions

View file

@ -235,7 +235,7 @@ static struct mcux_lptmr_config mcux_lptmr_config_0 = {
DEVICE_DT_INST_DEFINE(0, &mcux_lptmr_init, NULL,
&mcux_lptmr_data_0,
&mcux_lptmr_config_0,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
POST_KERNEL, CONFIG_COUNTER_INIT_PRIORITY,
&mcux_lptmr_driver_api);
static void mcux_lptmr_irq_config_0(const struct device *dev)