• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/input/mouse/

Lines Matching refs:hw

309 static void synaptics_parse_hw_state(unsigned char buf[], struct synaptics_data *priv, struct synaptics_hw_state *hw)
311 memset(hw, 0, sizeof(struct synaptics_hw_state));
314 hw->x = (((buf[3] & 0x10) << 8) |
317 hw->y = (((buf[3] & 0x20) << 7) |
321 hw->z = buf[2];
322 hw->w = (((buf[0] & 0x30) >> 2) |
326 hw->left = (buf[0] & 0x01) ? 1 : 0;
327 hw->right = (buf[0] & 0x02) ? 1 : 0;
330 hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
331 if (hw->w == 2)
332 hw->scroll = (signed char)(buf[1]);
336 hw->up = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
337 hw->down = ((buf[0] ^ buf[3]) & 0x02) ? 1 : 0;
350 hw->ext_buttons |= ((buf[5] & 0x08)) ? 0x80 : 0;
351 hw->ext_buttons |= ((buf[4] & 0x08)) ? 0x40 : 0;
353 hw->ext_buttons |= ((buf[5] & 0x04)) ? 0x20 : 0;
354 hw->ext_buttons |= ((buf[4] & 0x04)) ? 0x10 : 0;
356 hw->ext_buttons |= ((buf[5] & 0x02)) ? 0x08 : 0;
357 hw->ext_buttons |= ((buf[4] & 0x02)) ? 0x04 : 0;
359 hw->ext_buttons |= ((buf[5] & 0x01)) ? 0x02 : 0;
360 hw->ext_buttons |= ((buf[4] & 0x01)) ? 0x01 : 0;
364 hw->x = (((buf[1] & 0x1f) << 8) | buf[2]);
365 hw->y = (((buf[4] & 0x1f) << 8) | buf[5]);
367 hw->z = (((buf[0] & 0x30) << 2) | (buf[3] & 0x3F));
368 hw->w = (((buf[1] & 0x80) >> 4) | ((buf[0] & 0x04) >> 1));
370 hw->left = (buf[0] & 0x01) ? 1 : 0;
371 hw->right = (buf[0] & 0x02) ? 1 : 0;
382 struct synaptics_hw_state hw;
387 synaptics_parse_hw_state(psmouse->packet, priv, &hw);
389 if (hw.scroll) {
390 priv->scroll += hw.scroll;
393 input_report_key(dev, BTN_BACK, !hw.down);
395 input_report_key(dev, BTN_BACK, hw.down);
400 input_report_key(dev, BTN_FORWARD, !hw.up);
402 input_report_key(dev, BTN_FORWARD, hw.up);
409 if (hw.z > 0) {
413 switch (hw.w) {
416 num_fingers = hw.w + 2;
424 finger_width = hw.w;
437 if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1);
438 if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0);
440 if (hw.z > 0) {
441 input_report_abs(dev, ABS_X, hw.x);
442 input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y);
444 input_report_abs(dev, ABS_PRESSURE, hw.z);
451 input_report_key(dev, BTN_LEFT, hw.left);
452 input_report_key(dev, BTN_RIGHT, hw.right);
455 input_report_key(dev, BTN_MIDDLE, hw.middle);
458 input_report_key(dev, BTN_FORWARD, hw.up);
459 input_report_key(dev, BTN_BACK, hw.down);
463 input_report_key(dev, BTN_0 + i, hw.ext_buttons & (1 << i));