From 035c75200e3edd623ae0831aa5365af852fe6dc0 Mon Sep 17 00:00:00 2001 From: Bartosz Bilas Date: Tue, 12 Jul 2022 16:46:11 +0200 Subject: [PATCH] drivers: dac: dacx3608: 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 --- drivers/dac/Kconfig.dacx3608 | 10 ++++++++++ drivers/dac/dac_dacx3608.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/dac/Kconfig.dacx3608 b/drivers/dac/Kconfig.dacx3608 index a4f3ca5664..1595cdbeae 100644 --- a/drivers/dac/Kconfig.dacx3608 +++ b/drivers/dac/Kconfig.dacx3608 @@ -9,3 +9,13 @@ config DAC_DACX3608 depends on I2C help Enable the driver for the TI DACX3608. + +if DAC_DACX3608 + +config DAC_DACX3608_INIT_PRIORITY + int "Init priority" + default 80 + help + TI DACX3608 DAC device driver initialization priority. + +endif # DAC_DACX3608 diff --git a/drivers/dac/dac_dacx3608.c b/drivers/dac/dac_dacx3608.c index 3d51db5e08..9894259574 100644 --- a/drivers/dac/dac_dacx3608.c +++ b/drivers/dac/dac_dacx3608.c @@ -250,7 +250,7 @@ static const struct dac_driver_api dacx3608_driver_api = { &dacx3608_init, NULL, \ &dac##t##_data_##n, \ &dac##t##_config_##n, POST_KERNEL, \ - CONFIG_DAC_INIT_PRIORITY, \ + CONFIG_DAC_DACX3608_INIT_PRIORITY, \ &dacx3608_driver_api) /*