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

@ -234,7 +234,7 @@ static const struct mcux_pit_config mcux_pit_config_0 = {
DEVICE_DT_INST_DEFINE(0, &mcux_pit_init, NULL,
&mcux_pit_data_0, &mcux_pit_config_0, POST_KERNEL,
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &mcux_pit_driver_api);
CONFIG_COUNTER_INIT_PRIORITY, &mcux_pit_driver_api);
static void mcux_pit_irq_config_0(const struct device *dev)
{