Lines Matching refs:bri
164 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; in i2c_generic_bus_free() local
167 if (bri->get_bus_free) in i2c_generic_bus_free()
168 ret = bri->get_bus_free(adap); in i2c_generic_bus_free()
169 else if (bri->get_sda) in i2c_generic_bus_free()
170 ret = bri->get_sda(adap); in i2c_generic_bus_free()
188 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; in i2c_generic_scl_recovery() local
191 if (bri->prepare_recovery) in i2c_generic_scl_recovery()
192 bri->prepare_recovery(adap); in i2c_generic_scl_recovery()
201 bri->set_scl(adap, scl); in i2c_generic_scl_recovery()
203 if (bri->set_sda) in i2c_generic_scl_recovery()
204 bri->set_sda(adap, scl); in i2c_generic_scl_recovery()
213 if (!bri->get_scl(adap)) { in i2c_generic_scl_recovery()
222 bri->set_scl(adap, scl); in i2c_generic_scl_recovery()
231 if (bri->set_sda) in i2c_generic_scl_recovery()
232 bri->set_sda(adap, scl); in i2c_generic_scl_recovery()
246 if (bri->unprepare_recovery) in i2c_generic_scl_recovery()
247 bri->unprepare_recovery(adap); in i2c_generic_scl_recovery()
265 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; in i2c_init_recovery() local
268 if (!bri) in i2c_init_recovery()
271 if (!bri->recover_bus) { in i2c_init_recovery()
277 if (bri->scl_gpiod && bri->recover_bus == i2c_generic_scl_recovery) { in i2c_init_recovery()
278 bri->get_scl = get_scl_gpio_value; in i2c_init_recovery()
279 bri->set_scl = set_scl_gpio_value; in i2c_init_recovery()
280 if (bri->sda_gpiod) { in i2c_init_recovery()
281 bri->get_sda = get_sda_gpio_value; in i2c_init_recovery()
283 if (gpiod_get_direction(bri->sda_gpiod) == 0) in i2c_init_recovery()
284 bri->set_sda = set_sda_gpio_value; in i2c_init_recovery()
289 if (bri->recover_bus == i2c_generic_scl_recovery) { in i2c_init_recovery()
291 if (!bri->set_scl || !bri->get_scl) { in i2c_init_recovery()
295 if (!bri->set_sda && !bri->get_sda) { in i2c_init_recovery()