summaryrefslogtreecommitdiffstats
path: root/include/i2c/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/i2c/i2c.h')
-rw-r--r--include/i2c/i2c.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h
index c3e176354d..de2a7ea27d 100644
--- a/include/i2c/i2c.h
+++ b/include/i2c/i2c.h
@@ -139,4 +139,12 @@ extern int i2c_write_reg(struct i2c_client *client, u32 addr, const u8 *buf, u16
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+extern struct bus_type i2c_bus;
+
+static inline int i2c_register_driver(struct driver_d *drv)
+{
+ drv->bus = &i2c_bus;
+ return register_driver(drv);
+}
+
#endif /* I2C_I2C_H */