summaryrefslogtreecommitdiff
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorBibby Hsieh <bibby.hsieh@mediatek.com>2020-05-19 10:27:29 +0300
committerWolfram Sang <wsa@kernel.org>2020-05-20 16:25:55 +0300
commit6fe12cdbcfe35ad4726a619a9546822d34fc934c (patch)
tree070a48afd73687f4f589941f47472f1963e401ac /include/linux/i2c.h
parent6aab46bc52a8f579879d491c9d8062e03caa5c61 (diff)
downloadlinux-6fe12cdbcfe35ad4726a619a9546822d34fc934c.tar.xz
i2c: core: support bus regulator controlling in adapter
Although in the most platforms, the bus power of i2c are alway on, some platforms disable the i2c bus power in order to meet low power request. We get and enable bulk regulator in i2c adapter device. Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 456fc17ecb1c..bc83af0d38d1 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -15,6 +15,7 @@
#include <linux/device.h> /* for struct device */
#include <linux/sched.h> /* for completion */
#include <linux/mutex.h>
+#include <linux/regulator/consumer.h>
#include <linux/rtmutex.h>
#include <linux/irqdomain.h> /* for Host Notify IRQ */
#include <linux/of.h> /* for struct device_node */
@@ -721,6 +722,7 @@ struct i2c_adapter {
const struct i2c_adapter_quirks *quirks;
struct irq_domain *host_notify_domain;
+ struct regulator *bus_regulator;
};
#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)