Lines Matching refs:buf
22 unsigned char buf[4] = { 0 }; in pmic_reg_write() local
44 buf[2] = (cpu_to_le32(val) >> 16) & 0xff; in pmic_reg_write()
45 buf[1] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write()
46 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
48 buf[0] = (cpu_to_le32(val) >> 16) & 0xff; in pmic_reg_write()
49 buf[1] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write()
50 buf[2] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
55 buf[1] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write()
56 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
58 buf[0] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write()
59 buf[1] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
63 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
71 return dm_i2c_write(dev, reg, buf, pmic_i2c_tx_num); in pmic_reg_write()
73 return i2c_write(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num); in pmic_reg_write()
79 unsigned char buf[4] = { 0 }; in pmic_reg_read() local
96 ret = dm_i2c_read(dev, reg, buf, pmic_i2c_tx_num); in pmic_reg_read()
99 ret = i2c_read(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num); in pmic_reg_read()
107 ret_val = le32_to_cpu(buf[2] << 16 in pmic_reg_read()
108 | buf[1] << 8 | buf[0]); in pmic_reg_read()
110 ret_val = le32_to_cpu(buf[0] << 16 | in pmic_reg_read()
111 buf[1] << 8 | buf[2]); in pmic_reg_read()
115 ret_val = le32_to_cpu(buf[1] << 8 | buf[0]); in pmic_reg_read()
117 ret_val = le32_to_cpu(buf[0] << 8 | buf[1]); in pmic_reg_read()
120 ret_val = le32_to_cpu(buf[0]); in pmic_reg_read()