drivers: dac: mcp4725: set explicitly init priority
Since this DAC is connected via I2C bus the init priority value must be higher than the default 50 so it can be initialized later than the bus itself so add a dedicated init config symbol for that. Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
This commit is contained in:
parent
035c75200e
commit
5cf7adeb5b
2 changed files with 11 additions and 1 deletions
|
@ -9,3 +9,13 @@ config DAC_MCP4725
|
|||
depends on I2C
|
||||
help
|
||||
Enable the driver for the Microchip MCP4725.
|
||||
|
||||
if DAC_MCP4725
|
||||
|
||||
config DAC_MCP4725_INIT_PRIORITY
|
||||
int "Init priority"
|
||||
default 80
|
||||
help
|
||||
Microchip MCP4725 DAC device driver initialization priority.
|
||||
|
||||
endif # DAC_MCP4725
|
||||
|
|
|
@ -142,7 +142,7 @@ static const struct dac_driver_api mcp4725_driver_api = {
|
|||
NULL, \
|
||||
NULL, \
|
||||
&mcp4725_config_##index, POST_KERNEL, \
|
||||
CONFIG_DAC_INIT_PRIORITY, \
|
||||
CONFIG_DAC_MCP4725_INIT_PRIORITY, \
|
||||
&mcp4725_driver_api);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(INST_DT_MCP4725);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue