Lines Matching refs:res
766 int res, blen = 0, tmp, i; in read_block_data() local
773 for (res = 0; res < I2CDUMP_NUM_REGS; res += tmp) { in read_block_data()
775 buf_fd, res, I2C_SMBUS_BLOCK_MAX, in read_block_data()
776 cblock + res); in read_block_data()
783 if (res >= I2CDUMP_NUM_REGS) in read_block_data()
784 res = I2CDUMP_NUM_REGS; in read_block_data()
786 for (i = 0; i < res; i++) in read_block_data()
790 for (i = res; i < I2CDUMP_NUM_REGS; i++) in read_block_data()
804 int i, j, res; in dump_data() local
832 res = i2c_smbus_read_byte_data(bus_fd, i+j); in dump_data()
833 block[i+j] = res; in dump_data()
836 res = i2c_smbus_read_word_data(bus_fd, i+j); in dump_data()
837 if (res < 0) { in dump_data()
838 block[i+j] = res; in dump_data()
839 block[i+j+1] = res; in dump_data()
841 block[i+j] = res & 0xff; in dump_data()
842 block[i+j+1] = res >> 8; in dump_data()
846 res = i2c_smbus_read_byte(bus_fd); in dump_data()
847 block[i+j] = res; in dump_data()
850 res = block[i+j]; in dump_data()
856 } else if (res < 0) { in dump_data()
880 res = block[i+j]; in dump_data()
881 if (res < 0) { in dump_data()
883 } else if (res == 0x00 || res == 0xff) { in dump_data()
885 } else if (res < 32 || res >= 127) { in dump_data()
888 bb_putchar(res); in dump_data()
954 int fd, res; in i2cdump_main() local
1030 res = i2c_smbus_write_byte(fd, first); in i2cdump_main()
1031 if (res < 0) in i2cdump_main()