config: apalis-imx8: Enable FEC TXC delay
[oweals/u-boot.git] / include / power-domain.h
index ef15dc9f607cbbeb6994f44d9429b7a999eeab0b..72ff2ff25ba2b0d747d9f29d2c35e450b4d555a5 100644 (file)
@@ -155,4 +155,38 @@ static inline int power_domain_off(struct power_domain *power_domain)
 }
 #endif
 
+/**
+ * dev_power_domain_on - Enable power domains for a device .
+ *
+ * @dev:               The client device.
+ *
+ * @return 0 if OK, or a negative error code.
+ */
+#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) && \
+       CONFIG_IS_ENABLED(POWER_DOMAIN)
+int dev_power_domain_on(struct udevice *dev);
+#else
+static inline int dev_power_domain_on(struct udevice *dev)
+{
+       return 0;
+}
+#endif
+
+/**
+ * dev_power_domain_off - Disable power domains for a device .
+ *
+ * @dev:               The client device.
+ *
+ * @return 0 if OK, or a negative error code.
+ */
+#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) && \
+       CONFIG_IS_ENABLED(POWER_DOMAIN)
+int dev_power_domain_off(struct udevice *dev);
+#else
+static inline int dev_power_domain_off(struct udevice *dev)
+{
+       return 0;
+}
+#endif
+
 #endif