diff options
author | Biju Das <biju.das.jz@bp.renesas.com> | 2023-06-07 17:57:38 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-06-09 17:30:47 +0200 |
commit | 564d73c4d9201526bd976b9379d2aaf1a7133e84 (patch) | |
tree | 13dd5b78191f18f1848b952b8c59823be7be3ecf /include/linux/i2c.h | |
parent | edaac7d9fff62718d0edaa7ae99fd0be36450f32 (diff) | |
download | linux-564d73c4d9201526bd976b9379d2aaf1a7133e84.tar.gz linux-564d73c4d9201526bd976b9379d2aaf1a7133e84.tar.bz2 linux-564d73c4d9201526bd976b9379d2aaf1a7133e84.zip |
i2c: Add i2c_get_match_data()
Add i2c_get_match_data() to get match data for I2C, ACPI and
DT-based matching, so that we can optimize the driver code.
Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
[wsa: simplified var initialization]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 13a1ce38cb0c..3430cc2b05a6 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -367,6 +367,8 @@ struct i2c_adapter *i2c_verify_adapter(struct device *dev); const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id, const struct i2c_client *client); +const void *i2c_get_match_data(const struct i2c_client *client); + static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) { struct device * const dev = kobj_to_dev(kobj); |