Lines Matching defs:buf
50 static void ektf2127_parse_coordinates(const u8 *buf, unsigned int touch_count,
59 touches[i].x = (buf[index] & 0x0f);
61 touches[i].x |= buf[index + 2];
63 touches[i].y = (buf[index] & 0xf0);
65 touches[i].y |= buf[index + 1];
69 static void ektf2127_report_event(struct ektf2127_ts *ts, const u8 *buf)
75 touch_count = buf[1] & 0x07;
83 ektf2127_parse_coordinates(buf, touch_count, touches);
102 char buf[EKTF2127_TOUCH_REPORT_SIZE];
105 ret = i2c_master_recv(ts->client, buf, EKTF2127_TOUCH_REPORT_SIZE);
111 switch (buf[0]) {
113 ektf2127_report_event(ts, buf);
117 if (buf[1] == EKTF2127_ENV_NOISY)
126 dev_err(dev, "Unexpected packet header byte %#02x\n", buf[0]);
184 u8 buf[4];
189 buf[0] = EKTF2127_REQUEST;
190 buf[1] = width ? EKTF2127_WIDTH : EKTF2127_HEIGHT;
191 buf[2] = 0x00;
192 buf[3] = 0x00;
193 ret = i2c_master_send(client, buf, sizeof(buf));
194 if (ret != sizeof(buf)) {
203 ret = i2c_master_recv(client, buf, sizeof(buf));
204 if (ret != sizeof(buf)) {
210 if (buf[0] != EKTF2127_RESPONSE || buf[1] != what_code) {
212 what, buf[0], buf[1]);
216 return (((buf[3] & 0xf0) << 4) | buf[2]) - 1;
225 u8 buf[4];
260 i2c_master_recv(ts->client, buf, sizeof(buf));