Lines Matching refs:i2caddress
153 int i2caddress, ret, i; in find_ir_chip_on_i2c() local
160 i2caddress = ir_i2c_addr[i]; in find_ir_chip_on_i2c()
161 ret = vid_get_device(i2caddress, &dev); in find_ir_chip_on_i2c()
167 return i2caddress; in find_ir_chip_on_i2c()
197 static int read_voltage_from_INA220(int i2caddress) in read_voltage_from_INA220() argument
205 ret = vid_get_device(i2caddress, &dev); in read_voltage_from_INA220()
238 static int read_voltage_from_IR(int i2caddress) in read_voltage_from_IR() argument
246 ret = vid_get_device(i2caddress, &dev); in read_voltage_from_IR()
339 static int read_voltage_from_pmbus(int i2caddress) in read_voltage_from_pmbus() argument
347 ret = vid_get_device(i2caddress, &dev); in read_voltage_from_pmbus()
375 static int read_voltage(int i2caddress) in read_voltage() argument
381 voltage_read = read_voltage_from_IR(i2caddress); in read_voltage()
384 voltage_read = read_voltage_from_pmbus(i2caddress); in read_voltage()
397 static int wait_for_new_voltage(int vdd, int i2caddress) in wait_for_new_voltage() argument
401 vdd_current = read_voltage(i2caddress); in wait_for_new_voltage()
414 vdd_current = read_voltage(i2caddress); in wait_for_new_voltage()
427 static int wait_for_voltage_stable(int i2caddress) in wait_for_voltage_stable() argument
431 vdd = read_voltage(i2caddress); in wait_for_voltage_stable()
434 vdd_current = read_voltage(i2caddress); in wait_for_voltage_stable()
444 vdd_current = read_voltage(i2caddress); in wait_for_voltage_stable()
452 static int set_voltage_to_IR(int i2caddress, int vdd) in set_voltage_to_IR() argument
460 ret = vid_get_device(i2caddress, &dev); in set_voltage_to_IR()
480 wait = wait_for_new_voltage(vdd, i2caddress); in set_voltage_to_IR()
485 vdd_last = wait_for_voltage_stable(i2caddress); in set_voltage_to_IR()
495 static int set_voltage_to_pmbus(int i2caddress, int vdd) in set_voltage_to_pmbus() argument
506 ret = vid_get_device(i2caddress, &dev); in set_voltage_to_pmbus()
543 vdd_last = read_voltage_from_pmbus(i2caddress); in set_voltage_to_pmbus()
556 static int set_voltage(int i2caddress, int vdd) in set_voltage() argument
561 vdd_last = set_voltage_to_IR(i2caddress, vdd); in set_voltage()
564 vdd_last = set_voltage_to_pmbus(i2caddress, vdd); in set_voltage()
583 int ret, i2caddress = I2C_VOL_MONITOR_ADDR; in adjust_vdd() local
652 i2caddress = ret; in adjust_vdd()
653 debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); in adjust_vdd()
656 ret = vid_get_device(i2caddress, &dev); in adjust_vdd()
701 vdd_last = read_voltage(i2caddress); in adjust_vdd()
713 vdd_current = set_voltage(i2caddress, vdd_target); in adjust_vdd()
725 vdd_last = set_voltage(i2caddress, vdd_current); in adjust_vdd()
730 vdd_last = set_voltage(i2caddress, vdd_current); in adjust_vdd()
756 int vdd_last, ret, i2caddress = I2C_VOL_MONITOR_ADDR; in print_vdd() local
770 i2caddress = ret; in print_vdd()
771 debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); in print_vdd()
778 vdd_last = read_voltage(i2caddress); in print_vdd()