arm64: zynqmp: Handle CONFIG_BOARD_LATE_INIT via Kconfig
[platform/kernel/u-boot.git] / include / power-domain.h
index a558fbb..0099605 100644 (file)
@@ -98,6 +98,27 @@ int power_domain_get(struct udevice *dev, struct power_domain *power_domain)
 #endif
 
 /**
+ * power_domain_get_by_index - Get the indexed power domain for a device.
+ *
+ * @dev:               The client device.
+ * @power_domain:      A pointer to a power domain struct to initialize.
+ * @index:             Power domain index to be powered on.
+ *
+ * @return 0 if OK, or a negative error code.
+ */
+#if CONFIG_IS_ENABLED(POWER_DOMAIN)
+int power_domain_get_by_index(struct udevice *dev,
+                             struct power_domain *power_domain, int index);
+#else
+static inline
+int power_domain_get_by_index(struct udevice *dev,
+                             struct power_domain *power_domain, int index)
+{
+       return -ENOSYS;
+}
+#endif
+
+/**
  * power_domain_free - Free a previously requested power domain.
  *
  * @power_domain:      A power domain struct that was previously successfully