drivers: i2c: gpio: add bus recovery function
Add I2C bus recovery function to the I2C GPIO bitbang driver. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
ec90af8e78
commit
6aa8a83682
1 changed files with 8 additions and 0 deletions
|
@ -102,9 +102,17 @@ static int i2c_gpio_transfer(struct device *dev, struct i2c_msg *msgs,
|
|||
slave_address);
|
||||
}
|
||||
|
||||
static int i2c_gpio_recover_bus(struct device *dev)
|
||||
{
|
||||
struct i2c_gpio_context *context = dev->driver_data;
|
||||
|
||||
return i2c_bitbang_recover_bus(&context->bitbang);
|
||||
}
|
||||
|
||||
static struct i2c_driver_api api = {
|
||||
.configure = i2c_gpio_configure,
|
||||
.transfer = i2c_gpio_transfer,
|
||||
.recover_bus = i2c_gpio_recover_bus,
|
||||
};
|
||||
|
||||
static int i2c_gpio_init(struct device *dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue