Lines Matching refs:bri

155 	struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;  in i2c_generic_bus_free()  local
158 if (bri->get_bus_free) in i2c_generic_bus_free()
159 ret = bri->get_bus_free(adap); in i2c_generic_bus_free()
160 else if (bri->get_sda) in i2c_generic_bus_free()
161 ret = bri->get_sda(adap); in i2c_generic_bus_free()
179 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; in i2c_generic_scl_recovery() local
182 if (bri->prepare_recovery) in i2c_generic_scl_recovery()
183 bri->prepare_recovery(adap); in i2c_generic_scl_recovery()
191 bri->set_scl(adap, scl); in i2c_generic_scl_recovery()
193 if (bri->set_sda) in i2c_generic_scl_recovery()
194 bri->set_sda(adap, scl); in i2c_generic_scl_recovery()
203 if (!bri->get_scl(adap)) { in i2c_generic_scl_recovery()
212 bri->set_scl(adap, scl); in i2c_generic_scl_recovery()
215 if (bri->set_sda) in i2c_generic_scl_recovery()
216 bri->set_sda(adap, scl); in i2c_generic_scl_recovery()
230 if (bri->unprepare_recovery) in i2c_generic_scl_recovery()
231 bri->unprepare_recovery(adap); in i2c_generic_scl_recovery()
249 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; in i2c_init_recovery() local
252 if (!bri) in i2c_init_recovery()
255 if (!bri->recover_bus) { in i2c_init_recovery()
260 if (bri->scl_gpiod && bri->recover_bus == i2c_generic_scl_recovery) { in i2c_init_recovery()
261 bri->get_scl = get_scl_gpio_value; in i2c_init_recovery()
262 bri->set_scl = set_scl_gpio_value; in i2c_init_recovery()
263 if (bri->sda_gpiod) { in i2c_init_recovery()
264 bri->get_sda = get_sda_gpio_value; in i2c_init_recovery()
266 if (gpiod_get_direction(bri->sda_gpiod) == 0) in i2c_init_recovery()
267 bri->set_sda = set_sda_gpio_value; in i2c_init_recovery()
272 if (bri->recover_bus == i2c_generic_scl_recovery) { in i2c_init_recovery()
274 if (!bri->set_scl || !bri->get_scl) { in i2c_init_recovery()
278 if (!bri->set_sda && !bri->get_sda) { in i2c_init_recovery()