Lines Matching defs:buf
87 unsigned char *buf, int nb)
93 buf[0] = reg;
96 nw = i2c_master_send(pv->i2c, buf, 1);
109 nr = i2c_master_recv(pv->i2c, buf, nb);
126 unsigned char buf[16];
128 buf[0] = reg;
129 memcpy(buf+1, ptr, nb);
133 nw = i2c_master_send(pv->i2c, buf, nb);
149 unsigned char buf[2];
158 buf[0] = value >> (8 - shift);
159 buf[1] = value << shift;
160 rc = wf_fcu_write_reg(pv, 0x10 + (fan->id * 2), buf, 2);
173 unsigned char buf[2];
192 rc = wf_fcu_read_reg(pv, reg_base + (fan->id * 2), buf, 2);
196 *value = (buf[0] << (8 - shift)) | buf[1] >> shift;
205 unsigned char buf[2];
216 buf[0] = value;
217 rc = wf_fcu_write_reg(pv, 0x30 + (fan->id * 2), buf, 1);
229 unsigned char buf[2];
243 rc = wf_fcu_read_reg(pv, 0x30 + (fan->id * 2), buf, 1);
247 *value = (((s32)buf[0]) * 1000) / 2559;
497 unsigned char buf = 0xff;
500 rc = wf_fcu_write_reg(pv, 0xe, &buf, 1);
503 rc = wf_fcu_write_reg(pv, 0x2e, &buf, 1);
506 rc = wf_fcu_read_reg(pv, 0, &buf, 1);
509 pv->rpm_shift = (buf == 1) ? 2 : 3;