summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBibby Hsieh <bibby.hsieh@mediatek.com>2020-05-19 15:27:29 +0800
committerWolfram Sang <wsa@kernel.org>2020-05-20 15:25:55 +0200
commit6fe12cdbcfe35ad4726a619a9546822d34fc934c (patch)
tree070a48afd73687f4f589941f47472f1963e401ac /include
parent6aab46bc52a8f579879d491c9d8062e03caa5c61 (diff)
downloadlinux-6fe12cdbcfe35ad4726a619a9546822d34fc934c.tar.bz2
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')
-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)