From 5fc7304878eb1ffeeb74de0b4821b4680927f988 Mon Sep 17 00:00:00 2001 From: Bernt Johan Damslora Date: Mon, 2 Oct 2023 17:10:00 +0200 Subject: [PATCH] drivers: mfd: npm1300: Add separate initialization priority Enables setting the initialization priority of the nPM1300 independently from other MFDs. Signed-off-by: Bernt Johan Damslora --- drivers/mfd/Kconfig.npm1300 | 7 +++++++ drivers/mfd/Kconfig.npm6001 | 5 +---- drivers/mfd/mfd_npm1300.c | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/Kconfig.npm1300 b/drivers/mfd/Kconfig.npm1300 index cc3eb0ef30..506508bd90 100644 --- a/drivers/mfd/Kconfig.npm1300 +++ b/drivers/mfd/Kconfig.npm1300 @@ -8,3 +8,10 @@ config MFD_NPM1300 select I2C help Enable the Nordic nPM1300 PMIC multi-function device driver + +config MFD_NPM1300_INIT_PRIORITY + int "nPM1300 MFD initialization priority" + default MFD_INIT_PRIORITY + depends on MFD_NPM1300 + help + Multi-function device initialization priority for nPM1300. diff --git a/drivers/mfd/Kconfig.npm6001 b/drivers/mfd/Kconfig.npm6001 index be549ff96c..b81c942f2d 100644 --- a/drivers/mfd/Kconfig.npm6001 +++ b/drivers/mfd/Kconfig.npm6001 @@ -9,12 +9,9 @@ config MFD_NPM6001 help Enable the Nordic nPM6001 PMIC multi-function device driver -if MFD_NPM6001 - config MFD_NPM6001_INIT_PRIORITY int "nPM6001 MFD initialization priority" default MFD_INIT_PRIORITY + depends on MFD_NPM6001 help Multi-function device initialization priority for nPM6001. - -endif # MFD_NPM6001 diff --git a/drivers/mfd/mfd_npm1300.c b/drivers/mfd/mfd_npm1300.c index 678d3572a2..ef06b6da7f 100644 --- a/drivers/mfd/mfd_npm1300.c +++ b/drivers/mfd/mfd_npm1300.c @@ -297,6 +297,6 @@ int mfd_npm1300_remove_callback(const struct device *dev, struct gpio_callback * }; \ \ DEVICE_DT_INST_DEFINE(inst, mfd_npm1300_init, NULL, &data_##inst, &config##inst, \ - POST_KERNEL, CONFIG_MFD_INIT_PRIORITY, NULL); + POST_KERNEL, CONFIG_MFD_NPM1300_INIT_PRIORITY, NULL); DT_INST_FOREACH_STATUS_OKAY(MFD_NPM1300_DEFINE)