mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
i2c: core: add managed function for adding i2c adapters
Some I2C controller drivers will only unregister the I2C adapter in their .remove() callback, which can be done by simply using a managed variant to add the I2C adapter. So add the managed functions for adding the I2C adapter. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
2375843b50
commit
07740c92ae
2 changed files with 27 additions and 0 deletions
|
@ -846,6 +846,7 @@ static inline void i2c_mark_adapter_resumed(struct i2c_adapter *adap)
|
|||
*/
|
||||
#if IS_ENABLED(CONFIG_I2C)
|
||||
int i2c_add_adapter(struct i2c_adapter *adap);
|
||||
int devm_i2c_add_adapter(struct device *dev, struct i2c_adapter *adapter);
|
||||
void i2c_del_adapter(struct i2c_adapter *adap);
|
||||
int i2c_add_numbered_adapter(struct i2c_adapter *adap);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue