aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorBibby Hsieh <bibby.hsieh@mediatek.com>2021-05-27 15:55:53 +0800
committerWolfram Sang <wsa@kernel.org>2021-05-28 20:50:01 +0200
commit5a7b95fb993ec399c8a685552aa6a8fc995c40bd (patch)
tree4190b3019683c74603f18d283c01251d6310db8f /include/linux/i2c.h
parenti2c: core: Make debug message even more debuggish (diff)
downloadwireguard-linux-5a7b95fb993ec399c8a685552aa6a8fc995c40bd.tar.xz
wireguard-linux-5a7b95fb993ec399c8a685552aa6a8fc995c40bd.zip
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 can control bulk regulator if it is provided in i2c adapter device. Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> 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 e8f2ac8c9c3d..953a4eecb88f 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 */
@@ -729,6 +730,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)