drivers: adc: Refactor drivers to use shared init priority
Refactors all of the ADC drivers to use a shared driver class initialization priority configuration, CONFIG_ADC_INIT_PRIORITY, to allow configuring ADC 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 lmp90xxx, mcp320x, and mcux_adc16 drivers which have dependencies on GPIO, SPI, and/or DMA drivers and must therefore initialize later than the default device priority. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
This commit is contained in:
parent
f259790bf8
commit
b0cdef3c25
24 changed files with 34 additions and 36 deletions
|
@ -574,7 +574,7 @@ static int adc_emul_init(const struct device *dev)
|
|||
DEVICE_DT_INST_DEFINE(_num, adc_emul_init, NULL, \
|
||||
&adc_emul_data_##_num, \
|
||||
&adc_emul_config_##_num, POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_ADC_INIT_PRIORITY, \
|
||||
&adc_emul_api_##_num)
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(ADC_EMUL_INIT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue