power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY)
authorTroy Kisky <troykiskyboundary@gmail.com>
Mon, 13 Mar 2023 21:31:44 +0000 (14:31 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 10 May 2023 20:45:42 +0000 (16:45 -0400)
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@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/power/pmic.h

index 70f2709..6362216 100644 (file)
@@ -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
  * =====================