diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2020-03-31 11:47:04 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-01 07:45:47 +0200 |
commit | 1437676f8cdf8fafd3269e364fc06f996acc0aad (patch) | |
tree | 3d73a45bd69614806c195f03606cbf7138add92b /include/i2c | |
parent | 1a414ba273f9d8825957ce7b55b135c3b8e2b67a (diff) | |
download | barebox-1437676f8cdf8fafd3269e364fc06f996acc0aad.tar.gz barebox-1437676f8cdf8fafd3269e364fc06f996acc0aad.tar.xz |
i2c: Port of_find_i2c_device_by_node() from Linux
Port of_find_i2c_device_by_node() from Linux in order to allow looking
i2c_client up by corresponding DT node. Useful for interacting with
identical raw/driverless I2C devices that are not found on the same
bus between board variants.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/i2c')
-rw-r--r-- | include/i2c/i2c.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h index a694e4ab2f..56a887a13a 100644 --- a/include/i2c/i2c.h +++ b/include/i2c/i2c.h @@ -281,6 +281,7 @@ static inline int i2c_register_board_info(int busnum, extern int i2c_add_numbered_adapter(struct i2c_adapter *adapter); struct i2c_adapter *i2c_get_adapter(int busnum); struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node *node); +struct i2c_client *of_find_i2c_device_by_node(struct device_node *node); void i2c_parse_fw_timings(struct device_d *dev, struct i2c_timings *t, bool use_defaults); |