From 43b38b348b44ff19b40aa9e1ce9719f5cffe01fd Mon Sep 17 00:00:00 2001 From: Bartosz Bilas Date: Tue, 12 Jul 2022 16:37:35 +0200 Subject: [PATCH] drivers: dac: dacx0508: set explicitly init priority Since this DAC is connected via SPI 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.dacx0508 | 10 ++++++++++ drivers/dac/dac_dacx0508.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/dac/Kconfig.dacx0508 b/drivers/dac/Kconfig.dacx0508 index 33f13b2ba13..060e4f4ae62 100644 --- a/drivers/dac/Kconfig.dacx0508 +++ b/drivers/dac/Kconfig.dacx0508 @@ -9,3 +9,13 @@ config DAC_DACX0508 depends on SPI help Enable the driver for the TI DACx0508. + +if DAC_DACX0508 + +config DAC_DACX0508_INIT_PRIORITY + int "Init priority" + default 80 + help + TI DACx0508 DAC device driver initialization priority. + +endif # DAC_DACX0508 diff --git a/drivers/dac/dac_dacx0508.c b/drivers/dac/dac_dacx0508.c index 159bbd2013f..3976abf121c 100644 --- a/drivers/dac/dac_dacx0508.c +++ b/drivers/dac/dac_dacx0508.c @@ -385,7 +385,7 @@ static const struct dac_driver_api dacx0508_driver_api = { &dacx0508_init, NULL, \ &dac##t##_data_##n, \ &dac##t##_config_##n, POST_KERNEL, \ - CONFIG_DAC_INIT_PRIORITY, \ + CONFIG_DAC_DACX0508_INIT_PRIORITY, \ &dacx0508_driver_api) /*