summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc/psm.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r281704:rpaulo2015-04-251-1/+2
| | | | Synaptics: don't report the middle button when clickPad is used.
* MFC r281441:rpaulo2015-04-181-24/+116
| | | | Add support for controlling the trackpoint when Synaptics is enabled.
* MFC r281440:rpaulo2015-04-181-28/+141
| | | | | | | | | | | | | | | | | | Improve Synaptics support for newer touchpads. Enable two finger scrolling by default and disable the edge scrolling if the touchpad has no physical zone for it. Disable directional scrolling by default to avoid using extended buttons as scroll buttons. Add support for ClickPad. On Lenovo laptops, this is the button reported when one presses the touchpad. While there, fix a problem where the extended buttons were not reporting the button release event correctly: we need to save the state of the buttons and report it to sysmouse until we receive a packet from the touchpad indicating the button has been released. This makes it possible to use an extended button to resize a window. On Lenovo laptops, the major buttons are actually reported as extended buttons.
* Revert r255152:eadler2013-09-041-2/+2
| | | | | | | | | It turns out that synaptics_support was turned off by default because its probing method is too intrusive not because it was unstable. Once this is fixed it should be enabled once again. Reported by: delphij, jkim
* psm: Add support for middle and extended buttons on Synaptics touchpadsdumbbell2013-09-021-40/+91
| | | | | | | PR: kern/170834 Submitted by: Brandon Gooch <jamesbrandongooch@gmail.com> Tested by: Artyom Mirgorodskiy <artyom.mirgorodsky@gmail.com> MFC after: 1 month
* synaptics and trackpoint support are stable enough to be on by default.eadler2013-09-021-2/+2
| | | | | | Eventually both options should be removed. Reviewed by: dumbbell
* Remove a bogus re-assignment.jkim2013-05-131-2/+0
| | | | MFC after: 3 days
* List TrackPoint device before generic model.jkim2013-03-181-1/+1
|
* Add preliminary support for IBM/Lenovo TrackPoint.jkim2013-03-181-1/+270
| | | | | | PR: kern/147237 (based on the initial patch for 8.x) Tested by: glebius (device detection and suspend/resume) MFC after: 1 month
* psm: Support detection of Synaptics touchpad v7.5 and abovedumbbell2012-12-181-3/+9
| | | | | | | | | | | | Starting with firmware v7.5, the "Read TouchPad Modes" ($01) and "Read Capabilities" ($02) commands changed: previously constant bytes now carry variable information. We now compare those bytes to expected constants only for firmware prior to v7.5. Tested by: Zeus Panchenko <zeus@gnu.org.ua> MFC after: 1 week
* Fix typo: s/protocl/protocolkevlo2012-09-201-2/+2
|
* Use callout(9) instead of timeout(9) to manage timers.jhb2012-09-071-13/+15
|
* - Do not clobber softc when psm(4) is reintialized.jkim2012-03-271-141/+124
| | | | | | | | | | | | - Make INITAFTERSUSPEND flag independent of HOOKRESUME flag. - Automatically set INITAFTERSUSPEND flag when ALPS GlidePoint is detected. - Always probe Synaptics Touchpad. Allow MOUSE_SYN_GETHWINFO ioctl and automatically set INITAFTERSUSPEND flag when a supported device is detected, regardless of "hw.psm.synaptics_support" tunable setting. - Update psm(4) to reflect the above changes. - Remove long-time defunct SYNCHACK flag while I am in the neighborhood. MFC after: 1 month
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-2/+2
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* - When moving the IRQ resource from the psmcpnp device to the psm device,jhb2010-12-161-15/+5
| | | | | | | delete the IRQ resource from the psmcpnp device completely. - Don't allocate the IRQ resource shared. It is not a shareable interrupt on ISA. The bus driver can set RF_SHAREABLE if the IRQ is actually shareable on a non-ISA bus.
* Various small typos and grammar nits in comments.jhb2010-11-181-4/+4
|
* Let psm(4) use si_drv1 to refer to its softc.ed2010-09-091-28/+22
|
* Add new "hw.psm.tap_enabled" tunable and sysctl.dumbbell2009-12-181-0/+35
| | | | | | | | | | | | | This tunable allows one to enable (1) or disable (0) gestures like tap and tap-hold on Synaptics TouchPad when the Extended mode isn't enabled (ie. "hw.psm.synaptics_support" not set). By default, the value is -1 in order to keep the current behaviour of not enabling/disabling gestures explicitly. PR: kern/139272 Submitted by: David Horn <dhorn2000 AT gmail DOT com> Reviewed by: David Horn <dhorn2000 AT gmail DOT com>
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-4/+0
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-08-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
* Teach psm about O_ASYNCrnoland2009-03-161-0/+23
| | | | | | This makes Xorg happy if you aren't using moused. MFC after: 3 days
* Synaptics touchpads must be reinitialized after suspend/resume.dumbbell2008-12-171-1/+9
| | | | | | This fixes touchpad resume on Asus EeePC among others. Submitted by: rpaulo
* Rephrase and/or fix some comments in Synaptics touchpad initializationdumbbell2008-12-161-10/+15
| | | | function.
* Rewrite Synaptics touchpads support with the following goals in mind:dumbbell2008-10-141-175/+982
| | | | | | | | | | | | | | | | | o better quality of the movement smoothing o more features such as tap-hold and virtual scrolling Support must still be enabled with this line in your /boot/loader.conf: hw.psm.synaptics_support="1" The following sysctls were removed: hw.psm.synaptics.low_speed_threshold hw.psm.synaptics.min_movement hw.psm.synaptics.squelch_level An overview of this new driver and a short documentation about the added sysctls is available on the wiki: http://wiki.freebsd.org/SynapticsTouchpad
* Replace all calls to minor() with dev2unit().ed2008-09-271-2/+2
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Fill in sysctl descriptions.trhodes2008-07-261-10/+18
| | | | Approved by: philip
* Try to detect a Synaptics touchpad before IntelliMouse. Some touchpads willphilip2008-06-011-2/+2
| | | | | | | | | | | | | pretend to be IntelliMouse (which have a few more features than generic mice) causing the IntelliMouse probe to work and the Synaptics code never to be called. This should not break "real" IntelliMouse because the Synaptics detection code is fairly specific. PR: kern/120833 Submitted by: Eygene Ryabinkin <rea-fbsd -at- codelabs.ru> MFC after: 1 week
* Clean up and fix style(9) nits.jkim2008-04-081-2852/+2938
|
* - Add write(2) support for psm(4) in native operation level. Now arbitraryjkim2008-04-081-7/+53
| | | | | | | commands can be written to /dev/psm%d and status can be read back from it. - Reflect the change in psm(4) and bump version for ports. MFC after: 1 week
* Some PS/2 mice (at least the A4Tech X-7xx) need to be set to Intelli moderink2008-02-251-0/+7
| | | | | | | | | first before they can be set to Explorer mode. PR: kern/118578 Submitted by: Andriy Gapon <avg@icyb.net.ua> (I added some comments) Reviewed by: philip MFC after: 1 month
* Initialize mouse resolution to zero if converting frommjacob2007-06-171-0/+2
| | | | OLD to NEW.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Synaptics TouchPad seems to go back to Relative Mode after the calldumbbell2007-02-041-0/+10
| | | | | | | to set_controller_command_byte() call; by issueing a Read Mode Byte command, the touchpad is in Absolute Mode again. This problem occursed at least on Asus V6V laptops.
* Spell "Kensington Thinking Mouse" correctly.keramida2006-12-181-1/+1
|
* Add ALPS glide point ID and some compatibility IDs.takawata2006-03-151-0/+3
| | | | PR: kern/75008
* Fix a bug in Synaptics Touchapd support where psm(4) will enter an infinitedumbbell2006-01-051-1/+2
| | | | | | | loop if it receives an out of sync packet. Reviewed by: mux (mentor) MFC after: 4 days
* Fix -Wundef.ru2005-12-041-1/+1
|
* - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) sourcemarius2005-06-101-27/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files after they were repo-copied to sys/dev/atkbdc. The sources of atkbdc(4) and its children were moved to the new location in preparation for adding an EBus front-end to atkbdc(4) for use on sparc64; i.e. in order to not further scatter them over the whole tree which would have been the result of adding atkbdc_ebus.c in e.g. sys/sparc64/ebus. Another reason for the repo-copies was that some of the sources were misfiled, e.g. sys/isa/atkbd_isa.c wasn't ISA-specific at all but for hanging atkbd(4) off of atkbdc(4) and was renamed to atkbd_atkbdc.c accordingly. Most of sys/isa/psm.c, i.e. expect for its PSMC PNP part, also isn't ISA-specific. - Separate the parts of atkbdc_isa.c which aren't actually ISA-specific but are shareable between different atkbdc(4) bus front-ends into atkbdc_subr.c (repo-copied from atkbdc_isa.c). While here use bus_generic_rl_alloc_resource() and bus_generic_rl_release_resource() respectively in atkbdc_isa.c instead of rolling own versions. - Add sparc64 MD bits to atkbdc(4) and atkbd(4) and an EBus front-end for atkbdc(4). PS/2 controllers and input devices are used on a couple of Sun OEM boards and occur on either the EBus or the ISA bus. Depending on the board it's either the only on-board mean to connect a keyboard and mouse or an alternative to either RS232 or USB devices. - Wrap the PSMC PNP part of psm.c in #ifdef DEV_ISA so it can be compiled without isa(4) (e.g. for EBus-only machines). This ISA-specific part isn't separated into its own source file, yet, as it requires more work than was feasible for 6.0 in order to do it in a clean way. Actually philip@ is working on a rewrite of psm(4) so a more comprehensive clean-up and separation of hardware dependent and independent parts is expected to happen after 6.0. Tested on: i386, sparc64 (AX1105, AXe and AXi boards) Reviewed by: philip
* Make life for owners of Synaptics Touchpads more pleasant :-)philip2005-01-101-11/+207
| | | | | | | | | | | | | | | | | | | | | | | | | o Implement a shiny new algorithm to keep track of finger movement at slow speeds. This dramatically reduces the level of questionable language from users trying to resize windows. o Properly catch the many extra buttons and dials which manufacturers are known to screw onto Synaptics touchpad controllers. Currently, up to seven buttons are known to work, more should work too. o Add a number of sysctls allowing one to tune the driver to taste in a simple way: # Should the extra buttons act as axes or as middle button hw.psm.synaptics.directional_scrolls # These control the 'stickiness' at low speeds hw.psm.synaptics.low_speed_threshold hw.psm.synaptics.min_movement hw.psm.synaptics.squelch_level PR: kern/75725 Submitted by: Jason Kuri <jay@oneway.com> MFC after: 1 month
* Reduce diffs to work in progress before checking in serious changes.philip2005-01-031-19/+20
| | | | | | | | | | | | | | | | o Move the sysctls under debug.psm.* and hw.psm.* making them a bit clearer and more consistent with other drivers. o Remove the debug.psm_soft_timeout sysctl. It was introduced many moons ago in r1.64 but never referenced anywhere. o Introduce hw.psm.tap_threshold and hw.psm.tap_timeout to control the behaviour of taps on touchpads. People might like to fiddle with these if tapping seems to slow or too fast for them. o Add debug.psm.loglevel as a tunable so that verbosity can be set easily at boot-time (to watch probes and such) without having to compile a kernel with options PSM_DEBUG=N.
* Introduce a tunable to disable support for Synaptics touchpads. A number ofphilip2004-09-291-1/+11
| | | | | | | | | | | people have reported problems (stickyness, aiming difficulty) which is proving difficult to fix, so this will default to disable until sometime after 5.3R. To enable Synaptics support, set the 'hw.psm.synaptics_support=1' tunable. MT5 candidate. Approved by: njl
* Improve sync recovery algorithm:gibbs2004-08-271-97/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Remove PSM_SYNCERR_THRESHOLD1. This value specified how many sync errors were required before the mouse is re-initialised. Re-initialisation is now done after (packetsize * 2) sync errors as things aren't likely to improve after that. o Reset lastinputerror when re-initialisation occurs. We don't want to continue to drop data after re-initialisation. o Count the number of failed packets independently of the syncerrors statistic. syncerrors is useful for recovering sync within a single packet. pkterrors allows us to detect when the mouse changes its packet mode due to some external event (e.g. KVM switch). o Reinitialize the mouse if we see more than psmpkterrthresh errors during the validation period. The validation period begins as soon as a sync error is detected and continues until psmerrsecs/msecs time has elapsed. The defaults for these two values force a reset if we see two packet errors in a 2 second period. This allows rapid detection of packet framing errors caused by the mouse changing packet modes. o Export psmpkterrthresh as a sysctl o Export psmloglevel as a sysctl. o Enable more debugging code to be enabled at runtime via psmloglevel. o Simplify verbose conditioned loging by using a VLOG macro. o Add several comments describing the sync recovery algorithm of this driver. Large Portions by: Brian Somers <brian@Awfulhak.org> Inspired and Frustrated by: Belkin KVMs Reviewed by: njl, philip
* Defer the capture of the "expected sync bits" until the first "normal"gibbs2004-08-171-20/+13
| | | | | | | | | | data packet is received from the mouse. In the case of many KVM's, this avoids a bug in their mouse emulation that sends back incorrect sync when you explicitly request a data packet from the mouse. Without this change, you must force the driver into stock PS/2 mode or be flooded with a never ending stream of "out of sync" messages on these KVMs. Approved by: re
* Don't initialize static variables to 0 (C should just take care of that).philip2004-08-161-2/+2
| | | | Spotted by: njl
* Update support for Synaptics Touchpads (Volume V)philip2004-08-161-5/+29
| | | | | | | o Add (long awaited) support for guest devices Submitted by: Arne Schwabe <arne@rfc2549.org> Approved by: njl (in a former revision)
* Assume a finger of regular width when no width value is reported byphilip2004-08-081-3/+10
| | | | | | | the touchpad (which happens when it has no extended capabilities). Spotted by: dhw Forgotten by: philip
* Update support for Synaptics Touchpads (Volume IV)philip2004-08-081-2/+2
| | | | | | | | | | | | o Change the motion calculation to result in a more reasonable speed of motion This should fix the 'aiming' problems people have reported. It also mitigates (but doesn't completely solve) the 'stalling' problems at very low speeds. Tested by: many subscribers to -current Approved by: njl
* Update support for Synaptics Touchpads (Volume III)philip2004-08-081-0/+26
| | | | | | | | | | o Catch 'taps' as button presses o One finger sends button1, two fingers send button3, three fingers send button2 (double-click) Tested by: many subscribers to -current Approved by: njl
* Update support for Synaptics Touchpads (Volume II)philip2004-08-081-5/+26
| | | | | | | | | | | | | | o Handle the 'up/down' buttons some touchpads have as a z-axis (scrollwheel) as recommended by the specs o Report the buttons as button4 and button5 instead of button2 and button4, button2 can be emulated by pressing button1 and button3 simultaneously. This allows one to use the two extra buttons for other purposes if one so desires. Tested by: many subscribers to -current Approved by: njl
* Update support for Synaptics Touchpads (Volume I)philip2004-08-081-53/+64
| | | | | | | | | | | | | | | o Clean up whitespace and comments in the enable_synaptics() probing function o Only use (and rely on) the extended capability bits when we are told they actually exist o Partly ignore the (possibly dated?) part of the specification about the mode byte so that we can support 'guest devices' too. Tested by: many subscribers to -current Approved by: njl
OpenPOWER on IntegriCloud