diff options
| -rw-r--r-- | include/linux/i2c.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index bc2b19ad9357..200cf13b00f6 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -655,7 +655,7 @@ static inline int i2c_adapter_id(struct i2c_adapter *adap) | |||
| 655 | } | 655 | } |
| 656 | 656 | ||
| 657 | /** | 657 | /** |
| 658 | * module_i2c_driver() - Helper macro for registering a I2C driver | 658 | * module_i2c_driver() - Helper macro for registering a modular I2C driver |
| 659 | * @__i2c_driver: i2c_driver struct | 659 | * @__i2c_driver: i2c_driver struct |
| 660 | * | 660 | * |
| 661 | * Helper macro for I2C drivers which do not do anything special in module | 661 | * Helper macro for I2C drivers which do not do anything special in module |
| @@ -666,6 +666,17 @@ static inline int i2c_adapter_id(struct i2c_adapter *adap) | |||
| 666 | module_driver(__i2c_driver, i2c_add_driver, \ | 666 | module_driver(__i2c_driver, i2c_add_driver, \ |
| 667 | i2c_del_driver) | 667 | i2c_del_driver) |
| 668 | 668 | ||
| 669 | /** | ||
| 670 | * builtin_i2c_driver() - Helper macro for registering a builtin I2C driver | ||
| 671 | * @__i2c_driver: i2c_driver struct | ||
| 672 | * | ||
| 673 | * Helper macro for I2C drivers which do not do anything special in their | ||
| 674 | * init. This eliminates a lot of boilerplate. Each driver may only | ||
| 675 | * use this macro once, and calling it replaces device_initcall(). | ||
| 676 | */ | ||
| 677 | #define builtin_i2c_driver(__i2c_driver) \ | ||
| 678 | builtin_driver(__i2c_driver, i2c_add_driver) | ||
| 679 | |||
| 669 | #endif /* I2C */ | 680 | #endif /* I2C */ |
| 670 | 681 | ||
| 671 | #if IS_ENABLED(CONFIG_OF) | 682 | #if IS_ENABLED(CONFIG_OF) |
