Lines Matching refs:ri
271 struct tps6586x_regulator *ri) in tps6586x_regulator_preinit() argument
276 if (ri->enable_reg[0] == ri->enable_reg[1] && in tps6586x_regulator_preinit()
277 ri->enable_bit[0] == ri->enable_bit[1]) in tps6586x_regulator_preinit()
280 ret = tps6586x_read(parent, ri->enable_reg[0], &val1); in tps6586x_regulator_preinit()
284 ret = tps6586x_read(parent, ri->enable_reg[1], &val2); in tps6586x_regulator_preinit()
288 if (!(val2 & (1 << ri->enable_bit[1]))) in tps6586x_regulator_preinit()
295 if (!(val1 & (1 << ri->enable_bit[0]))) { in tps6586x_regulator_preinit()
296 ret = tps6586x_set_bits(parent, ri->enable_reg[0], in tps6586x_regulator_preinit()
297 1 << ri->enable_bit[0]); in tps6586x_regulator_preinit()
302 return tps6586x_clr_bits(parent, ri->enable_reg[1], in tps6586x_regulator_preinit()
303 1 << ri->enable_bit[1]); in tps6586x_regulator_preinit()
338 struct tps6586x_regulator *ri; in find_regulator_info() local
362 ri = &table[i]; in find_regulator_info()
363 if (ri->desc.id == id) in find_regulator_info()
364 return ri; in find_regulator_info()
369 ri = &tps6586x_regulator[i]; in find_regulator_info()
370 if (ri->desc.id == id) in find_regulator_info()
371 return ri; in find_regulator_info()
452 struct tps6586x_regulator *ri = NULL; in tps6586x_regulator_probe() local
479 ri = find_regulator_info(id, version); in tps6586x_regulator_probe()
481 if (!ri) { in tps6586x_regulator_probe()
486 err = tps6586x_regulator_preinit(pdev->dev.parent, ri); in tps6586x_regulator_probe()
495 config.driver_data = ri; in tps6586x_regulator_probe()
500 rdev = devm_regulator_register(&pdev->dev, &ri->desc, &config); in tps6586x_regulator_probe()
503 ri->desc.name); in tps6586x_regulator_probe()