Lines Matching +full:0 +full:x0216

172 static SYSCTL_NODE(_hw_usb, OID_AUTO, atp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
177 ATP_LLEVEL_DISABLED = 0,
421 { USB_VPI(USB_VENDOR_APPLE, 0x020e, FG_DRIVER_INFO(FOUNTAIN)) },
422 { USB_VPI(USB_VENDOR_APPLE, 0x020f, FG_DRIVER_INFO(FOUNTAIN)) },
423 { USB_VPI(USB_VENDOR_APPLE, 0x0210, FG_DRIVER_INFO(FOUNTAIN)) },
424 { USB_VPI(USB_VENDOR_APPLE, 0x030a, FG_DRIVER_INFO(FOUNTAIN)) },
425 { USB_VPI(USB_VENDOR_APPLE, 0x030b, FG_DRIVER_INFO(GEYSER1)) },
428 { USB_VPI(USB_VENDOR_APPLE, 0x0214, FG_DRIVER_INFO(GEYSER2)) },
429 { USB_VPI(USB_VENDOR_APPLE, 0x0215, FG_DRIVER_INFO(GEYSER2)) },
430 { USB_VPI(USB_VENDOR_APPLE, 0x0216, FG_DRIVER_INFO(GEYSER2)) },
433 { USB_VPI(USB_VENDOR_APPLE, 0x0217, FG_DRIVER_INFO(GEYSER3)) },
434 { USB_VPI(USB_VENDOR_APPLE, 0x0218, FG_DRIVER_INFO(GEYSER3)) },
435 { USB_VPI(USB_VENDOR_APPLE, 0x0219, FG_DRIVER_INFO(GEYSER3)) },
438 { USB_VPI(USB_VENDOR_APPLE, 0x021a, FG_DRIVER_INFO(GEYSER4)) },
439 { USB_VPI(USB_VENDOR_APPLE, 0x021b, FG_DRIVER_INFO(GEYSER4)) },
440 { USB_VPI(USB_VENDOR_APPLE, 0x021c, FG_DRIVER_INFO(GEYSER4)) },
443 { USB_VPI(USB_VENDOR_APPLE, 0x0229, FG_DRIVER_INFO(GEYSER4)) },
444 { USB_VPI(USB_VENDOR_APPLE, 0x022a, FG_DRIVER_INFO(GEYSER4)) },
445 { USB_VPI(USB_VENDOR_APPLE, 0x022b, FG_DRIVER_INFO(GEYSER4)) },
448 { USB_VPI(USB_VENDOR_APPLE, 0x020d, FG_DRIVER_INFO(GEYSER1_17inch)) },
453 .caps = 0,
458 .caps = 0,
585 X = 0,
618 #define ATSF_ZOMBIE 0x1
674 #define ATP_ENABLED 0x01
675 #define ATP_ZOMBIES_EXIST 0x02
676 #define ATP_DOUBLE_TAP_DRAG 0x04
677 #define ATP_VALID 0x08
727 FG_STATUS_BUTTON = (uint8_t)0x01, /* The button was pressed */
728 FG_STATUS_BASE_UPDATE = (uint8_t)0x04, /* Data from an untouched pad.*/
732 RAW_SENSOR_MODE = (uint8_t)0x01,
733 HID_MODE = (uint8_t)0x08
751 .basename[0] = ATP_DRIVER_NAME,
820 .endpoint = 0, /* Control pipe */
824 .interval = 0, /* no pre-delay */
838 memset(pstroke, 0, sizeof(*pstroke)); in atp_alloc_stroke()
866 sc->sc_n_strokes = 0; in atp_init_stroke_pool()
868 memset(&sc->sc_strokes_data, 0, sizeof(sc->sc_strokes_data)); in atp_init_stroke_pool()
870 for (x = 0; x != ATP_MAX_STROKES; x++) { in atp_init_stroke_pool()
887 mode_value = (uint8_t)0x04; in atp_set_device_mode()
892 sc->sc_mode_bytes, sizeof(sc->sc_mode_bytes), 0 /* interface idx */, in atp_set_device_mode()
893 0x03 /* type */, 0x00 /* id */); in atp_set_device_mode()
899 if (sc->sc_mode_bytes[0] == mode_value) in atp_set_device_mode()
910 sc->sc_mode_bytes[0] = mode_value; in atp_set_device_mode()
912 sc->sc_mode_bytes, sizeof(sc->sc_mode_bytes), 0 /* interface idx */, in atp_set_device_mode()
913 0x03 /* type */, 0x00 /* id */)); in atp_set_device_mode()
925 mode_value = 0x04; in atp_reset_callback()
931 sc->sc_mode_bytes[0] = mode_value; in atp_reset_callback()
935 (uint8_t)0x03 /* type */, (uint8_t)0x00 /* id */); in atp_reset_callback()
936 USETW(req.wIndex, 0); in atp_reset_callback()
939 pc = usbd_xfer_get_frame(xfer, 0); in atp_reset_callback()
940 usbd_copy_in(pc, 0, &req, sizeof(req)); in atp_reset_callback()
942 usbd_copy_in(pc, 0, sc->sc_mode_bytes, MODE_LENGTH); in atp_reset_callback()
944 usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); in atp_reset_callback()
960 return (0); in atp_enable()
963 memset(&sc->sc_status, 0, sizeof(sc->sc_status)); in atp_enable()
970 return (0); in atp_enable()
983 u_int n_xpspans = 0; in fg_interpret_sensor_data()
984 u_int n_ypspans = 0; in fg_interpret_sensor_data()
1004 ((sc->sc_state & ATP_VALID) == 0)) { in fg_interpret_sensor_data()
1029 sc->sc_ibtn = (status_bits & FG_STATUS_BUTTON) ? MOUSE_BUTTON1DOWN : 0; in fg_interpret_sensor_data()
1039 if ((sc->sc_status.flags == 0) && (sc->sc_n_strokes == 0)) { in fg_interpret_sensor_data()
1059 sc->sc_idlecount = 0; in fg_interpret_sensor_data()
1063 sc->sc_idlecount = 0; in fg_interpret_sensor_data()
1074 * indices: 0 1 2 3 4 5 6 7 8 ... 15 ... 20 21 22 23 24
1106 for (i = 0, di = (axis == Y) ? 1 : 2; i < 8; di += 5, i++) { in fg_extract_sensor_data()
1115 for (i = 0, di = (axis == Y) ? 1 : 19; i < num; /* empty */ ) { in fg_extract_sensor_data()
1123 for (i = 0, di = (axis == Y) ? 2 : 20; i < num; /* empty */ ) { in fg_extract_sensor_data()
1139 for (i = 0; i < n; i++) { in fg_get_pressures()
1145 if (p[i] < 0) in fg_get_pressures()
1146 p[i] = 0; in fg_get_pressures()
1154 p[i] = 0; /* filter away noise */ in fg_get_pressures()
1168 u_int num_spans = 0; in fg_detect_pspans()
1180 memset(spans, 0, max_spans * sizeof(fg_pspan)); in fg_detect_pspans()
1181 maxp = 0; in fg_detect_pspans()
1183 for (i = 0; i < num_sensors; i++) { in fg_detect_pspans()
1187 if (p[i] == 0) { in fg_detect_pspans()
1196 maxp = 0; in fg_detect_pspans()
1226 maxp = 0; in fg_detect_pspans()
1243 for (i = 0; i < num_spans; i++) { in fg_detect_pspans()
1279 WSP_SIZEOF_FINGER_SENSOR_DATA) != 0) in wsp_interpret_sensor_data()
1290 n_fingers = 0; in wsp_interpret_sensor_data()
1294 for (i = 0; i < n_source_fingers; i++, source_fingerp++) { in wsp_interpret_sensor_data()
1296 if (le16toh(0x1234) != 0x1234) { in wsp_interpret_sensor_data()
1311 if (source_fingerp->touch_major == 0) in wsp_interpret_sensor_data()
1321 if ((sc->sc_n_strokes == 0) && (n_fingers == 0)) in wsp_interpret_sensor_data()
1337 sc->sc_status.button = sc->sc_ibtn ? MOUSE_BUTTON1DOWN : 0; in wsp_interpret_sensor_data()
1367 delta_mickeys = 0; in fg_match_stroke_component()
1383 delta_mickeys = 0; in fg_match_stroke_component()
1394 u_int repeat_index = 0; in fg_match_strokes_against_pspans()
1399 for (i = 0; i < n_pspans; i++) { in fg_match_strokes_against_pspans()
1409 for (i = 0; i < n_pspans; i++) { in fg_match_strokes_against_pspans()
1420 if ((repeat_count > 0) && (i == repeat_index)) in fg_match_strokes_against_pspans()
1443 for (i = 0; i != n_fingers; i++) { in wsp_match_strokes_against_fingers()
1497 u_int repeat_count = 0; in fg_update_strokes()
1544 (((repeat_count != 0) && ((n_xpspans < n_ypspans))) ? in fg_update_strokes()
1545 repeat_count : 0)); in fg_update_strokes()
1547 (((repeat_count != 0) && (n_ypspans < n_xpspans)) ? in fg_update_strokes()
1548 repeat_count : 0)); in fg_update_strokes()
1571 for (i = 0; i < n_xpspans; i++) { in fg_update_strokes()
1574 for (j = 0; j < n_ypspans; j++) { in fg_update_strokes()
1598 fg_add_stroke(sc, &pspans_x[0], &pspans_y[0]); in fg_update_strokes()
1643 if (sc->sc_n_strokes > 0) { in wsp_update_strokes()
1656 for (i = 0; i != n_fingers; i++) { in wsp_update_strokes()
1720 for (i = 0, nspans[X] = 0; i < n_xpspans; i++) { in fg_add_new_strokes()
1726 for (j = 0, nspans[Y] = 0; j < n_ypspans; j++) { in fg_add_new_strokes()
1735 for (i = 0, j = 0; (i < nspans[X]) && (j < nspans[Y]); i++, j++) in fg_add_new_strokes()
1738 u_int cum = 0; in fg_add_new_strokes()
1741 u_int repeat_index = 0; /* index of the multi-span */ in fg_add_new_strokes()
1745 for (i = 0; i < nspans[repeat_axis]; i++) { in fg_add_new_strokes()
1753 i = 0, j = 0; in fg_add_new_strokes()
1758 if (repeat_count > 0) { in fg_add_new_strokes()
1813 strokep->instantaneous_dx = 0; in atp_advance_stroke_state()
1814 strokep->instantaneous_dy = 0; in atp_advance_stroke_state()
1865 (I) = 0; /* clobber small movement */ \ in atp_update_pending_mickeys()
1867 if ((I) > 0) { \ in atp_update_pending_mickeys()
1886 /* truncate pending to 0 if it becomes negative. */ \ in atp_update_pending_mickeys()
1887 (P) = imax((P), 0); \ in atp_update_pending_mickeys()
1907 /* truncate pending to 0 if it becomes positive. */ \ in atp_update_pending_mickeys()
1908 (P) = imin((P), 0); \ in atp_update_pending_mickeys()
1935 strokep->pending_dx = 0; in atp_compute_stroke_movement()
1936 strokep->pending_dy = 0; in atp_compute_stroke_movement()
1954 return ((strokep->movement_dx != 0) || (strokep->movement_dy != 0)); in atp_compute_stroke_movement()
1994 if (strokep->cum_movement_y == 0) in atp_is_horizontal_scroll()
2004 if (strokep->cum_movement_x == 0) in atp_is_vertical_scroll()
2013 u_int8_t n_touches_reaped = 0; in atp_reap_sibling_zombies()
2014 u_int8_t n_slides_reaped = 0; in atp_reap_sibling_zombies()
2015 u_int8_t n_horizontal_scrolls = 0; in atp_reap_sibling_zombies()
2016 int horizontal_scroll = 0; in atp_reap_sibling_zombies()
2023 if ((strokep->flags & ATSF_ZOMBIE) == 0) in atp_reap_sibling_zombies()
2045 if (sc->sc_ibtn != 0) in atp_reap_sibling_zombies()
2048 if ((n_touches_reaped == 0) && (n_slides_reaped == 0)) in atp_reap_sibling_zombies()
2053 if (n_touches_reaped != 0) { in atp_reap_sibling_zombies()
2059 atp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); in atp_reap_sibling_zombies()
2063 atp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON3DOWN); in atp_reap_sibling_zombies()
2066 atp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON2DOWN); in atp_reap_sibling_zombies()
2072 atp_add_to_queue(sc, 0, 0, 0, 0); /* button release */ in atp_reap_sibling_zombies()
2075 if (horizontal_scroll < 0) in atp_reap_sibling_zombies()
2076 atp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON4DOWN); in atp_reap_sibling_zombies()
2078 atp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON5DOWN); in atp_reap_sibling_zombies()
2079 atp_add_to_queue(sc, 0, 0, 0, 0); /* button release */ in atp_reap_sibling_zombies()
2091 ((sc->sc_state & ATP_ZOMBIES_EXIST) == 0) && in atp_convert_to_slide()
2136 buf[0] = sc->sc_mode.syncmask[1]; in atp_add_to_queue()
2137 buf[0] |= buttons_out; in atp_add_to_queue()
2169 if ((usbd_lookup_id_by_uaa(fg_devs, sizeof(fg_devs), uaa)) == 0) in atp_probe()
2173 if ((usbd_lookup_id_by_uaa(wsp_devs, sizeof(wsp_devs), uaa)) == 0) in atp_probe()
2206 if ((sc->sc_expected_sensor_data_len <= 0) || in atp_attach()
2230 else if ((err = atp_set_device_mode(sc, RAW_SENSOR_MODE)) != 0) { in atp_attach()
2273 sc->sc_hw.hwid = 0; in atp_attach()
2278 sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; in atp_attach()
2280 sc->sc_mode.accelfactor = 0; in atp_attach()
2281 sc->sc_mode.level = 0; in atp_attach()
2283 sc->sc_state = 0; in atp_attach()
2284 sc->sc_ibtn = 0; in atp_attach()
2286 callout_init_mtx(&sc->sc_callout, &sc->sc_mutex, 0); in atp_attach()
2288 return (0); in atp_attach()
2315 return (0); in atp_detach()
2329 pc = usbd_xfer_get_frame(xfer, 0); in atp_intr()
2330 usbd_copy_out(pc, 0, sc->sc_sensor_data, len); in atp_intr()
2333 memset(sc->sc_sensor_data + len, 0, in atp_intr()
2343 if (sc->sc_status.button != 0) { in atp_intr()
2362 u_int8_t n_movements = 0; in atp_intr()
2363 int dx = 0; in atp_intr()
2364 int dy = 0; in atp_intr()
2365 int dz = 0; in atp_intr()
2396 dy = dx = 0; in atp_intr()
2409 if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { in atp_intr()
2410 usbd_xfer_set_frame_len(xfer, 0, in atp_intr()
2438 if ((rate > 0) && (sc->sc_xfer[ATP_INTR_DT] != NULL)) { in atp_start_read()
2444 sc->sc_pollrate = 0; in atp_start_read()
2467 if (sc->sc_fflags == 0) { in atp_open()
2469 if ((rc = atp_enable(sc)) != 0) in atp_open()
2481 return (0); in atp_open()
2492 if (sc->sc_fflags == 0) { in atp_close()
2502 int error = 0; in atp_ioctl()
2519 else if ((mode.level < 0) || (mode.level > 1)) { in atp_ioctl()
2527 if (sc->sc_mode.level == 0) { in atp_ioctl()
2530 sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; in atp_ioctl()
2535 sc->sc_mode.syncmask[0] = MOUSE_SYS_SYNCMASK; in atp_ioctl()
2544 if ((*(int *)addr < 0) || (*(int *)addr > 1)) { in atp_ioctl()
2551 if (sc->sc_mode.level == 0) { in atp_ioctl()
2554 sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; in atp_ioctl()
2559 sc->sc_mode.syncmask[0] = MOUSE_SYS_SYNCMASK; in atp_ioctl()
2569 sc->sc_status.button = 0; in atp_ioctl()
2570 sc->sc_status.dx = 0; in atp_ioctl()
2571 sc->sc_status.dy = 0; in atp_ioctl()
2572 sc->sc_status.dz = 0; in atp_ioctl()
2597 error = sysctl_handle_int(oidp, &tmp, 0, req); in atp_sysctl_scale_factor_handler()
2598 if (error != 0 || req->newptr == NULL) in atp_sysctl_scale_factor_handler()
2602 return (0); /* no change */ in atp_sysctl_scale_factor_handler()
2603 if ((tmp == 0) || (tmp > (10 * ATP_SCALE_FACTOR))) in atp_sysctl_scale_factor_handler()
2610 return (0); in atp_sysctl_scale_factor_handler()