Lines Matching defs:buf
80 u8 buf[2 * EXC3000_LEN_FRAME];
87 const u8 *buf, int num)
89 for (; num--; buf += EXC3000_LEN_POINT) {
90 if (buf[0] & BIT(0)) {
91 input_mt_slot(input, buf[1]);
94 get_unaligned_le16(buf + 2),
95 get_unaligned_le16(buf + 4),
119 static int exc3000_read_frame(struct exc3000_data *data, u8 *buf)
131 ret = i2c_master_recv(client, buf, EXC3000_LEN_FRAME);
138 if (get_unaligned_le16(buf) != EXC3000_LEN_FRAME)
148 u8 *buf = data->buf;
150 total_slots = buf[3];
158 ret = exc3000_read_frame(data, buf + EXC3000_LEN_FRAME);
163 if (buf[EXC3000_LEN_FRAME + 3] != 0) {
177 exc3000_report_slots(input, &data->prop, buf + 4, slots);
179 buf += EXC3000_LEN_FRAME;
197 u8 *buf = data->buf;
200 ret = exc3000_read_frame(data, buf);
207 switch (buf[2]) {
228 u8 buf[EXC3000_LEN_VENDOR_REQUEST] = { 0x67, 0x00, 0x42, 0x00, 0x03 };
236 buf[5] = request_len;
237 memcpy(&buf[6], request, request_len);
239 ret = i2c_master_send(data->client, buf, EXC3000_LEN_VENDOR_REQUEST);
251 if (data->buf[3] >= EXC3000_LEN_FRAME) {
256 memcpy(response, &data->buf[4], data->buf[3]);
257 ret = data->buf[3];
267 struct device_attribute *attr, char *buf)
286 return sprintf(buf, "%d.%d\n", response[2], response[3]);
292 return sprintf(buf, "%s\n", &response[1]);
297 struct device_attribute *attr, char *buf)
308 return sprintf(buf, "%s\n", &response[1]);
313 struct device_attribute *attr, char *buf)
324 return sprintf(buf, "%s\n", &response[1]);