[PATCH v3 22/23] power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY)

Troy Kisky troykiskyboundary at gmail.com
Mon Mar 13 22:31:44 CET 2023


This avoids an error in converting to CONFIG_IS_ENABLED(DM_PMIC).
Many boards SPL code needs these definitions to compile, even if
the functions are not linked.

Signed-off-by: Troy Kisky <troykiskyboundary at gmail.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 include/power/pmic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/power/pmic.h b/include/power/pmic.h
index 70f2709bd0b..636221692d0 100644
--- a/include/power/pmic.h
+++ b/include/power/pmic.h
@@ -86,7 +86,7 @@ struct pmic {
 #endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
 
 /* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
-#ifdef CONFIG_DM_PMIC
+#if defined(CONFIG_DM_PMIC) || !CONFIG_IS_ENABLED(POWER_LEGACY)
 /**
  * U-Boot PMIC Framework
  * =====================
-- 
2.34.1



More information about the U-Boot mailing list