Lines Matching defs:buf
226 char buf[4];
229 error = synaptics_send_cmd(psmouse, query_cmd, resp.buf + 1);
667 static int synaptics_is_pt_packet(u8 *buf)
669 return (buf[0] & 0xFC) == 0x84 && (buf[3] & 0xCC) == 0xC4;
735 static void synaptics_parse_agm(const u8 buf[],
742 agm_packet_type = (buf[5] & 0x30) >> 4;
747 agm->x = (((buf[4] & 0x0f) << 8) | buf[1]) << 1;
748 agm->y = (((buf[4] & 0xf0) << 4) | buf[2]) << 1;
749 agm->z = ((buf[3] & 0x30) | (buf[5] & 0x0f)) << 1;
754 priv->agm_count = buf[1];
762 static void synaptics_parse_ext_buttons(const u8 buf[],
770 hw->ext_buttons = buf[4] & ext_mask;
771 hw->ext_buttons |= (buf[5] & ext_mask) << ext_bits;
774 static int synaptics_parse_hw_state(const u8 buf[],
781 hw->w = (((buf[0] & 0x30) >> 2) |
782 ((buf[0] & 0x04) >> 1) |
783 ((buf[3] & 0x04) >> 2));
786 synaptics_parse_agm(buf, priv, hw);
790 hw->x = (((buf[3] & 0x10) << 8) |
791 ((buf[1] & 0x0f) << 8) |
792 buf[4]);
793 hw->y = (((buf[3] & 0x20) << 7) |
794 ((buf[1] & 0xf0) << 4) |
795 buf[5]);
796 hw->z = buf[2];
798 hw->left = (buf[0] & 0x01) ? 1 : 0;
799 hw->right = (buf[0] & 0x02) ? 1 : 0;
814 } else if (hw->w >= 4 && ((buf[0] ^ buf[3]) & 0x01)) {
843 hw->left = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
846 hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
848 hw->scroll = (s8)buf[1];
852 hw->up = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
853 hw->down = ((buf[0] ^ buf[3]) & 0x02) ? 1 : 0;
857 ((buf[0] ^ buf[3]) & 0x02)) {
858 synaptics_parse_ext_buttons(buf, priv, hw);
861 hw->x = (((buf[1] & 0x1f) << 8) | buf[2]);
862 hw->y = (((buf[4] & 0x1f) << 8) | buf[5]);
864 hw->z = (((buf[0] & 0x30) << 2) | (buf[3] & 0x3F));
865 hw->w = (((buf[1] & 0x80) >> 4) | ((buf[0] & 0x04) >> 1));
867 hw->left = (buf[0] & 0x01) ? 1 : 0;
868 hw->right = (buf[0] & 0x02) ? 1 : 0;
1359 void *data, char *buf)
1363 return sprintf(buf, "%c\n", priv->disable_gesture ? '1' : '0');
1367 void *data, const char *buf,
1374 err = kstrtouint(buf, 10, &value);