summaryrefslogtreecommitdiff
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorLuis Oliveira <Luis.Oliveira@synopsys.com>2017-01-26 20:45:32 +0300
committerWolfram Sang <wsa@the-dreams.de>2017-01-29 00:12:37 +0300
commitcefae80249f6bf3fdbc7c3a00bc43deb4c1bccf0 (patch)
tree019fc491fc1a6a0ec825c98d60b8f8268884d40b /include/linux/i2c.h
parent50b918c5a6ffad1d9fae29c4fdcb52383b123665 (diff)
downloadlinux-cefae80249f6bf3fdbc7c3a00bc43deb4c1bccf0.tar.xz
i2c: core: helper function to detect slave mode
This function has the purpose of mode detection by checking the device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. Currently only checks using OF functions (ACPI slave not supported yet). Signed-off-by: Luis Oliveira <lolivei@synopsys.com> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 4b45ec46161f..f0ba4bac7452 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -282,6 +282,7 @@ enum i2c_slave_event {
extern int i2c_slave_register(struct i2c_client *client, i2c_slave_cb_t slave_cb);
extern int i2c_slave_unregister(struct i2c_client *client);
+extern bool i2c_detect_slave_mode(struct device *dev);
static inline int i2c_slave_event(struct i2c_client *client,
enum i2c_slave_event event, u8 *val)