aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLuis Oliveira <[email protected]>2017-01-26 17:45:32 +0000
committerWolfram Sang <[email protected]>2017-01-28 22:12:37 +0100
commitcefae80249f6bf3fdbc7c3a00bc43deb4c1bccf0 (patch)
tree019fc491fc1a6a0ec825c98d60b8f8268884d40b /include/linux
parent50b918c5a6ffad1d9fae29c4fdcb52383b123665 (diff)
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 <[email protected]> Suggested-by: Andy Shevchenko <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'include/linux')
-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)