aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-08-07 07:15:11 -0400
committerTom Rini <trini@konsulko.com>2018-08-07 07:15:11 -0400
commitcca7429ddd24d0cccc72f708a6f05c6ab9a75303 (patch)
tree2176a8a80050fe9839e2ef39e82ef6dc57ff68e8 /include
parentbb694d4e898b1368ba96e01481dc0a79c491e77c (diff)
parent3d7690aec1020aa579eee189ed07d5e6289e3617 (diff)
downloadu-boot-cca7429ddd24d0cccc72f708a6f05c6ab9a75303.zip
u-boot-cca7429ddd24d0cccc72f708a6f05c6ab9a75303.tar.gz
u-boot-cca7429ddd24d0cccc72f708a6f05c6ab9a75303.tar.bz2
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Diffstat (limited to 'include')
-rw-r--r--include/imx_lpi2c.h3
-rw-r--r--include/power-domain.h29
2 files changed, 32 insertions, 0 deletions
diff --git a/include/imx_lpi2c.h b/include/imx_lpi2c.h
index 3fbb40b..2700e5f 100644
--- a/include/imx_lpi2c.h
+++ b/include/imx_lpi2c.h
@@ -8,6 +8,8 @@
#ifndef __IMX_LPI2C_H__
#define __IMX_LPI2C_H__
+#include <clk.h>
+
struct imx_lpi2c_bus {
int index;
ulong base;
@@ -15,6 +17,7 @@ struct imx_lpi2c_bus {
int speed;
struct i2c_pads_info *pads_info;
struct udevice *bus;
+ struct clk per_clk;
};
struct imx_lpi2c_reg {
diff --git a/include/power-domain.h b/include/power-domain.h
index aba8c0f..a558fbb 100644
--- a/include/power-domain.h
+++ b/include/power-domain.h
@@ -87,7 +87,15 @@ struct power_domain {
* @power_domain A pointer to a power domain struct to initialize.
* @return 0 if OK, or a negative error code.
*/
+#if CONFIG_IS_ENABLED(POWER_DOMAIN)
int power_domain_get(struct udevice *dev, struct power_domain *power_domain);
+#else
+static inline
+int power_domain_get(struct udevice *dev, struct power_domain *power_domain)
+{
+ return -ENOSYS;
+}
+#endif
/**
* power_domain_free - Free a previously requested power domain.
@@ -96,7 +104,14 @@ int power_domain_get(struct udevice *dev, struct power_domain *power_domain);
* requested by power_domain_get().
* @return 0 if OK, or a negative error code.
*/
+#if CONFIG_IS_ENABLED(POWER_DOMAIN)
int power_domain_free(struct power_domain *power_domain);
+#else
+static inline int power_domain_free(struct power_domain *power_domain)
+{
+ return -ENOSYS;
+}
+#endif
/**
* power_domain_on - Enable power to a power domain.
@@ -105,7 +120,14 @@ int power_domain_free(struct power_domain *power_domain);
* requested by power_domain_get().
* @return 0 if OK, or a negative error code.
*/
+#if CONFIG_IS_ENABLED(POWER_DOMAIN)
int power_domain_on(struct power_domain *power_domain);
+#else
+static inline int power_domain_on(struct power_domain *power_domain)
+{
+ return -ENOSYS;
+}
+#endif
/**
* power_domain_off - Disable power ot a power domain.
@@ -114,6 +136,13 @@ int power_domain_on(struct power_domain *power_domain);
* requested by power_domain_get().
* @return 0 if OK, or a negative error code.
*/
+#if CONFIG_IS_ENABLED(POWER_DOMAIN)
int power_domain_off(struct power_domain *power_domain);
+#else
+static inline int power_domain_off(struct power_domain *power_domain)
+{
+ return -ENOSYS;
+}
+#endif
#endif