cyapa - attempt #2 to fix boot issue * Previous fix didn't work. It appears that the trackpad can sometimes loose its mind even after initializing ok, so instead of doing a load-time fix we now check the status byte in the poll. * If the poll status indicates that cyapa is not running the device will be bootstrapped again. * Also, when not running do not try to interpret remaining status fields for input.
cyapa - Implement power save mode, try to fix boot issue (Acer c720 chromebook) * Implement power save mode when the pad hasn't been touched for 10 seconds. Return to full power on any activity. * Try to fix an issue when cyapa is loaded from /boot/loader.conf or built into the kernel. For some reason cyapa polls that it isn't running but we'd already gone through the bootstrap sequence and determined that it was running. Why it stops is not known but it appears doing a status query after init completion puts it in the right state.
cyapa - Reduced polling rate on idle detection * Reduce the polling rate from 100hz to 20hz when the trackpad is not in use. This greatly reduces power consumption by the trackpad and cpus. Power consumption on my Acer C720 drops from ~8.2W to ~7.8W using default values with this (and the prior I2C interrupt) commit. * Reduce the polling rate to 1hz when the trackpad is not open. TODO - we should power-down the trackpad in this situation. * The idle rate is used whenever the trackpad has been idle more than 1 second.
cyapa - Add false 3-finger button and add emulation for all three buttons * 3-finger sequences can now be used to emulate all three buttons rather than just the left button. When you place three fingers down, the one you place last and/or the one you tap determines the button. If the left finger is last then the LEFT mouse button is emulation. Middle finger (of the three) emulates the MIDDLE mouse button, and the right finger emulates the right mouse button. Only one button can be emulated at a time. * Add detection for false 3-finger buttons. When you place all three fingers down at the same time within 1/25 of a second this is detected and will emulate NO fingers. You can then simply tap the finger you want after moving the mouse pointer to where you want. (In addition to the normal one-finger or two-finger mousing, this also allows you to mouse with three fingers). * WARNING! These trackpads have a limitation when three or more fingers are down. This makes emulating a 4-finger or 5-finger 'claw' (for button-4 or button-5) very difficult so we currently do not support that. If three or more fingers are placed on the pad in a horizontal line (all Y coordinates are the same), the pad will get confused after a few seconds. It will recalibrate and de-confuse itself if you life your hand off the pad for a few seconds. The solution is when using 3-finger sequences to place your fingers on a SLIGHT diagonal so their Y coordinates are slightly different. This will yield much more reliable operation of the trackpadd's finger detection function.
cyapa - Introduce better three-finger button emulation * Change the three-finger button emulation such that the third finger that you use to tap will emulate the LEFT, MIDDLE, or RIGHT buttons depending on its X position relative to the other two fingers that are being held down. e.g. if you arrange fingers left-to-right A, B, C, and you hold B and C on the pad and tap A, that's a LEFT button. If you hold A and C and tap B, that's a middle button, and if you hold A and B and tap C, that's a right button. * This methodology allows all three buttons to be emulated cleanly without having to depress the trackpad's physical button. * Document all jestures.
cyapa - cleanup, bug fixes * Document the xorg.conf config. * Fix some button state change issues that could lead to false button handling when the slider is active. * Increase the distance that must be travelled before locking to the left button on finger movement for button presses. * Add experimental button-4 and button-5 (4-finger/5-finger) support, but at the moment it isn't playing nice with X.
cyapa - Add Intellimouse support (mousewheel) - right side slider * Adds emulation of a mouse wheel. The driver is still ps/2 compatible but if you want a mousewheel specify the "imps/2" protocol. Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "imps/2" # Option "Protocol" "ps/2" Option "Device" "/dev/cyapa0-67" EndSection * The mousewheel is emulated by touching the rightmost border of the trackpad with a single finger and sliding your finger up or down. * Any button push with two fingers down will now ALWAYS emulate the left mouse button, even if you haven't moved the mouse. * FEATURE SUMMARY: - Supports right-side slider if "imps/2" protocol is used. - Emulates middle and right buttons if you push the trackpad button from the left, middle, or right side of the pad with one finger. - Trackpad button is always the 'left' button if you press it with two fingers. - You can also get the 'left' button with three fingers (try shifting the mouse around with two fingers and then tap a third finger), without actually articulating the trackpad button. This is VERY convenient. - Has jitter supression. - True tracking for X and Y. Within reason (X will drop deltas despite our best efforts), shifting your finger around the pad will not lose deltas, meaning that you can shift around and when you return your finger to where you started, the mouse should be where it started too. - Multi-finger delta handling. This is not reported to X, but the driver tracks which finger touched first and delta tracking will be based on that finger. If you lift that finger up, the next finger will take over and the driver is coded to not improperly 'jump' the mouse due to where the next finger is relative to the first. This means that spurious fingers won't mess up your mouse. Remember however that three or more fingers emulates the left button.
cyapa - Adjust button and multi-touch handling a bit * If you finger-move more than 16 pixels, the button press will always be registered as a LEFT button press. This makes it much easier to move around the pad and hit GUI buttons, move windows around, etc. * Three fingers simulates the left button without actually having to hit it. (it's too easy to accidently have two fingers down so we don't simulate the left button with two fingers). This makes it even easier to move windows around and hit GUI buttons. * If you just hit the button without a finger-move, the button press will be LEFT, MIDDLE, or RIGHT depending on where you are on the pad, as before. * Track identifiers when multiple fingers are down. The trackpad can track up to 5 fingers. Use the identifier tracking to avoid jumping the coordinates to a different finger (which would cause the mouse to jump). This results in much easier mouse movement.
kernel - cyapa driver operational in PS/2 mode * For now don't try to emulate the event infrastructure or trackpad infrastructure. * Requires ig4 for chrome. Include this in /boot/loader.conf for now: ig4_load="YES" cyapa_load="YES" * Implement a character device interface that is compatible with PS/2. The X configuation would thus be something like this: Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "ps/2" Option "Device" "/dev/cyapa0-67" EndSection * Implement simple left/middle/right button emulation depending on where on the trackpad you push the button. * Do not implement simple-touch for buttons, that creates all sorts of false positives. The trackpad has an actual button (the whole pad) if you push hard enough.
kernel - Initial cyapa driver and input skeleton * Add the cyapa driver (work still in progress). It should be able to probe and attach and currently has debugging kprintf()s for scanning and testing. It does not supply a stream for Xorg yet. * Add a skeleton for subr_input.c (input event handler). This is what will eventually supply a stream for Xorg and also help support the input ioctl()s.