• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/input/mouse/

Lines Matching refs:hw

360 static void synaptics_parse_hw_state(unsigned char buf[], struct synaptics_data *priv, struct synaptics_hw_state *hw)
362 memset(hw, 0, sizeof(struct synaptics_hw_state));
365 hw->x = (((buf[3] & 0x10) << 8) |
368 hw->y = (((buf[3] & 0x20) << 7) |
372 hw->z = buf[2];
373 hw->w = (((buf[0] & 0x30) >> 2) |
377 hw->left = (buf[0] & 0x01) ? 1 : 0;
378 hw->right = (buf[0] & 0x02) ? 1 : 0;
386 hw->left = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
389 hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
390 if (hw->w == 2)
391 hw->scroll = (signed char)(buf[1]);
395 hw->up = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
396 hw->down = ((buf[0] ^ buf[3]) & 0x02) ? 1 : 0;
409 hw->ext_buttons |= ((buf[5] & 0x08)) ? 0x80 : 0;
410 hw->ext_buttons |= ((buf[4] & 0x08)) ? 0x40 : 0;
412 hw->ext_buttons |= ((buf[5] & 0x04)) ? 0x20 : 0;
413 hw->ext_buttons |= ((buf[4] & 0x04)) ? 0x10 : 0;
415 hw->ext_buttons |= ((buf[5] & 0x02)) ? 0x08 : 0;
416 hw->ext_buttons |= ((buf[4] & 0x02)) ? 0x04 : 0;
418 hw->ext_buttons |= ((buf[5] & 0x01)) ? 0x02 : 0;
419 hw->ext_buttons |= ((buf[4] & 0x01)) ? 0x01 : 0;
423 hw->x = (((buf[1] & 0x1f) << 8) | buf[2]);
424 hw->y = (((buf[4] & 0x1f) << 8) | buf[5]);
426 hw->z = (((buf[0] & 0x30) << 2) | (buf[3] & 0x3F));
427 hw->w = (((buf[1] & 0x80) >> 4) | ((buf[0] & 0x04) >> 1));
429 hw->left = (buf[0] & 0x01) ? 1 : 0;
430 hw->right = (buf[0] & 0x02) ? 1 : 0;
441 struct synaptics_hw_state hw;
446 synaptics_parse_hw_state(psmouse->packet, priv, &hw);
448 if (hw.scroll) {
449 priv->scroll += hw.scroll;
452 input_report_key(dev, BTN_BACK, !hw.down);
454 input_report_key(dev, BTN_BACK, hw.down);
459 input_report_key(dev, BTN_FORWARD, !hw.up);
461 input_report_key(dev, BTN_FORWARD, hw.up);
468 if (hw.z > 0) {
472 switch (hw.w) {
475 num_fingers = hw.w + 2;
483 finger_width = hw.w;
496 if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1);
497 if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0);
499 if (hw.z > 0) {
500 input_report_abs(dev, ABS_X, hw.x);
501 input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y);
503 input_report_abs(dev, ABS_PRESSURE, hw.z);
509 input_report_key(dev, BTN_LEFT, hw.left);
510 input_report_key(dev, BTN_RIGHT, hw.right);
518 input_report_key(dev, BTN_MIDDLE, hw.middle);
521 input_report_key(dev, BTN_FORWARD, hw.up);
522 input_report_key(dev, BTN_BACK, hw.down);
526 input_report_key(dev, BTN_0 + i, hw.ext_buttons & (1 << i));