aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/atkbdc
Commit message (Collapse)AuthorAgeFilesLines
...
* psm(4): Add sanity checks to Synaptics touchpad driver resolution parser.Vladimir Kondratyev2017-10-191-2/+4
| | | | | | | | | | | | This fixes "Kernel has only x or y resolution, not both" libinput error. Reported by: Ivan <bsd@abinet.ru> Tested by: Ivan <bsd@abinet.ru> Approved by: gonzo (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=324774
* psm: add support for evdev protocolVladimir Kondratyev2017-05-291-24/+582
| | | | | | | | | | | | | | | | | | | Both relative and absolute multitouch modes are supported. To enable psm(4) evdev support one should: 1. Add `device evdev` and `options EVDEV_SUPPORT` to kernel config file 2. Add hw.psm.elantech_support=1 or hw.psm.synaptics_support=1 to /boot/loader.conf for activation of absolute mode on touchpads 3. Add kern.evdev.rcpt_mask=12 to /etc/sysctl.conf to enable psm event sourcing and disable sysmouse Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10265 Tested by: wulf, Jan Kokemueller (Lenovo devs) Notes: svn path=/head/; revision=319162
* Reduce synaptics touch sensitivityVladimir Kondratyev2017-05-041-1/+1
| | | | | | | | | | | | | Increase hw.psm.synaptics.min_pressure default value from 16 to 32 to nearly match Linux driver (30-35 hysteresis loop). This makes libinput tap detection more reliable. Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=317819
* psm(4): Remove sys/libkern.h header inclusionVladimir Kondratyev2017-05-041-1/+0
| | | | | | | | | | | | It is already included via sys/systm.h Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317818
* Set predefined logical touchpad sizes for several ancient Elan hw v.2Vladimir Kondratyev2017-05-041-9/+33
| | | | | | | | | | | | | | models. This change is based on Linux driver. Determine logical trace size. It used for calculation of touch sizes in surface units for MT-protocol type B evdev reports. Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317817
* Report 3-rd and 4-th fingers as first finger for Elan hw v.2 and v.3 asVladimir Kondratyev2017-05-041-17/+21
| | | | | | | | | | | | | | Linux does. It should not affect gesture processing in current state as it ignores finger coords on 3-finger tap detection but it should make evdev reports looking more Linux-alike. Reviewed by: gonzo Approved by: gonzo MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317816
* Enable palm detection on two finger touches for multitouch trackpads.Vladimir Kondratyev2017-05-041-3/+7
| | | | | | | | | | Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317815
* psm(4): reduce cursor jumping on palm detectionVladimir Kondratyev2017-05-041-20/+24
| | | | | | | | | | | | This is done with discarding pointer movements rather then mouse packets Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317814
* Adjust Elantech palm width threshold to nearly match synaptics defaultsVladimir Kondratyev2017-05-041-0/+3
| | | | | | | | | | Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317813
* Reduce default tap_min_queue size for Elan touchpadsVladimir Kondratyev2017-05-041-0/+3
| | | | | | | | | | | | | | | Elan hw v.4 touchpads often sends touchpad release packet right after touchpad touch one. Most probably this happens due to PS/2 limited bandwith. Reducing of tap_min_queue size to 1 makes multifinger tap detection more reliable in this case. Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317812
* Fix triple-finger taps reported as double-finger for Elan hw v.4 touchpadsVladimir Kondratyev2017-05-041-5/+34
| | | | | | | | | | | | | | | Wait for all advertised head packets after status packet have been received. This fixes rare but quite annoying issue in Elan hw v.4 touchpads support when triple-finger taps are reported as double-finger taps under several circumstances. Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10266 Notes: svn path=/head/; revision=317811
* [psm] Fix calculation for clickpad softbuttons at the topOleksandr Tymoshenko2017-02-151-1/+1
| | | | | | | | | | | | | | | On laptops like the ThinkPad X240, ClickPad buttons are located at the top. The hw.psm.synaptics.softbuttons_y sysctl was supposed to allow this by setting the value to a negative one (e.g. -1700). However, the condition was wrong (double negative), and doing that placed the buttons in an unreachable area. PR: 216342 Submitted by: Greg V <greg@unrelenting.technology> MFC after: 1 week Notes: svn path=/head/; revision=313757
* [evdev] Add evdev support to atkbd(4) driverOleksandr Tymoshenko2016-11-032-0/+87
| | | | | | | | | | | | To enable event sourcing from atkbd kern.evdev.rcpt_mask value should have bit 3 set. Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8381 Notes: svn path=/head/; revision=308240
* [psm] Fix choosing wrong mode for synaptic device + trackpointOleksandr Tymoshenko2016-11-021-16/+25
| | | | | | | | | | | | | With guest trackpoint present trackpoint probing switched synaptics device to absolute mode with different protocol instead of keeping it in relative mode. PR: 213757 Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru> MFC after: 1 week Notes: svn path=/head/; revision=308189
* Assume all coreboot BIOSes have the need for these workarounds becauseWarner Losh2016-10-171-1/+1
| | | | | | | | coreboot implements the keyboard controller and it's common to all Chromebooks. The workaround won't hurt and may help. Notes: svn path=/head/; revision=307468
* Fix extended buttons support on synaptic clickpadOleksandr Tymoshenko2016-10-061-16/+21
| | | | | | | | | | | Fix regression introduced by r306355 on synaptic clickpads with extended buttons (buttons stopped working) PR: 205690 Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru> Notes: svn path=/head/; revision=306746
* Fix indentation.Gleb Smirnoff2016-10-041-1/+1
| | | | | | | CID: 1363671 Notes: svn path=/head/; revision=306679
* Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUNOleksandr Tymoshenko2016-09-301-12/+13
| | | | | | | | | | | | | | | - Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support, and hw.psm.elantech_support with respective sysctls declared with CTLFLAG_TUN. It simplifies checking them in userland, also makes them easier to get discovered by user - Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT declaration by adding CTLFLAG_TUN to read/write sysctls that were already declared for these tunables. Suggested by: jhb Notes: svn path=/head/; revision=306474
* Add Elantech trackpad supportOleksandr Tymoshenko2016-09-261-461/+1644
| | | | | | | | | | | | | | | | Elantech trackpads are found in some laptops like the Asus UX31E. They are "synaptics compatible" but use a slightly different protocol. Elantech hardware support is not enabled by default and just like Synaptic or TrackPoint devices it should be enabled by setting tunable, in this case hw.psm.elantech_support, to non-zero value PR: 205690 Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru> MFC after: 1 week Notes: svn path=/head/; revision=306355
* Use OF_prop_free instead of direct call to free(9)Oleksandr Tymoshenko2016-05-181-5/+5
| | | | | | | Reviewed by: marius Notes: svn path=/head/; revision=300173
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-3/+3
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* sys/dev: use our nitems() macro when it is avaliable through param.h.Pedro F. Giffuni2016-04-193-12/+10
| | | | | | | | | | No functional change, only trivial cases are done in this sweep, Drivers that can get further enhancements will be done independently. Discussed in: freebsd-current Notes: svn path=/head/; revision=298307
* Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.Justin Hibbits2016-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver). Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t. Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile) Tested PAE and devinfo on virtualbox (live CD) Special thanks to bz for his testing on ARM. Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544 Notes: svn path=/head/; revision=297000
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-273-8/+8
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* When exiting two-finger scroll the Synaptics device may report a jump inAndrew Turner2015-12-141-1/+10
| | | | | | | | | absolute position. This seems to be correlated with only removing a single finger. To work around this report no movement on from the first packet when the user exits scrolling. Notes: svn path=/head/; revision=292197
* Synaptics: fix a problem with trackpoint passthrough.Rui Paulo2015-06-191-5/+22
| | | | | | | | | | | There was a inconsistency which led to enable passthrough commands being interpreted as actual touchpad commands. Submitted by: Jan Kokemüller <jan.kokemueller at gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=284585
* Fix miss from r284320.Gleb Smirnoff2015-06-161-1/+1
| | | | | | | Coverity: 1018895 Notes: svn path=/head/; revision=284450
* Unbreak mouse on resume on Thinkpads when hw.psm.trackpoint_support=0,Gleb Smirnoff2015-06-121-57/+64
| | | | | | | | | | | | | | | | | | | | | | | | which is default. It was broken in r281441. It appears that set_trackpoint_parameters() call on resume disables the mouse. So, we need not call it on resume if hw.psm.trackpoint_support=0. The problem is that the probe functions are used both for probing and for reiniting on resume. And the absense of the softc parameter is used as a mark to distinguish reinit and probe, which is quite ugly. At the same time the softc parameter is needed to call set_trackpoint_parameters(). o Change the arguments of probefunc_t to always supply the softc, and use additional enum argument to tell probing from initing. o Don't call set_trackpoint_parameters() from global doinitialize(), instead call it from the enable_trackpoint() only. o In enable_synaptics() call enable_trackpoint() in both probe and reinit cases. Together with: Jan Kokemüller <jan.kokemueller gmail.com> Notes: svn path=/head/; revision=284320
* synaptics: more support for semi-MT trackpads.Rui Paulo2015-05-101-70/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several improvements to the Synaptics driver to support semi-multitouch trackpads and some other fixes: - Two finger scrolling support for "semi-MT" touchpads. Those include many of the older Synaptics touchpads before "true" multitouch support (indicated by capMultiFinger). Semi-MT touchpads can report a second finger position, but the X or Y coordinate may be swapped with some coordinate of the first finger. This is a result of how the hardware works internally. Therefore, all that can be reliably extracted is the bounding box of the two finger positions. Semi-MT touchpads can be recognized by the capAdvancedGestures capability bit. After setting the mode byte, advanced gestures mode has to be enabled. Then, data packets compatible with the capMultiFinger format are sent, so the same two finger scrolling code can be leveraged. Enabling advanced gestures mode on true multitouch touchpads should be harmless. Linux seems to always enable advanced gestures mode. - Put mode setting logic into own functions synaptics_preferred_mode() and synaptics_set_mode() to have this in one place. synaptics_passthrough_on() and synaptics_passthrough_off() currently always use 0xc1 as the mode byte, which may be wrong for touchpads that don't have capExtended. - Expose X and Y resolution of touchpad to userland. Also expose minimum and maximum X and Y coordinates. This is useful for programs in userspace that read raw PSM packets (with PSM_LEVEL_NATIVE enabled) and need to interpret the coordinates. - Also send "extended w mode" packets (see section 3.2.9 of 511-000275-01_RevB.pdf) to userspace if PSM_LEVEL_NATIVE is enabled. This is useful for userspace programs/drivers such as xf86-input-synaptics that can handle these packets. - Fix parsing of nExtendedQueries, and request extended/continued capability bits depending on this value. - capReportsMax, capClearPad, capAdvancedGestures and capCoveredPad must be extracted from status[0] and not status[2], I think. Submitted by: Jan Kokemüller jan.kokemueller at gmail.com Notes: svn path=/head/; revision=282734
* Remove leftover from r282269.Jung-uk Kim2015-04-301-11/+0
| | | | | | | | MFC after: 2 weeks X-MFC with: r282269 Notes: svn path=/head/; revision=282277
* atkbd: remove usage of x86biosRoger Pau Monné2015-04-301-53/+16
| | | | | | | | | | | | | Instead of trying to get the keyboard repeat rate set by the BIOS just set a default one. This allows removing the usage of x86bios from atkbd. Sponsored by: Citrix Systems R&D Reviewed by: jkim, delphij Differential Revision: https://reviews.freebsd.org/D2399 MFC after: 2 weeks Notes: svn path=/head/; revision=282269
* Synaptics: don't report the middle button when clickPad is used.Rui Paulo2015-04-181-1/+2
| | | | | | | | | | | On trackpads that had support for both, we were sending two button events when the trackpad was pressed. Tested by: Jakob Alvermark <jakob at alvermark.net> MFC after: 1 week Notes: svn path=/head/; revision=281704
* Add support for controlling the trackpoint when Synaptics is enabled.Rui Paulo2015-04-111-24/+116
| | | | | | | | | | | | | To accomplish this, we must put the Synaptics hardware in passthrough mode when talking to the trackpoint. I only performed minor style modifications. Submitted by: Jan Kokemüller <jan.kokemueller at gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=281441
* Improve Synaptics support for newer touchpads.Rui Paulo2015-04-111-27/+140
| | | | | | | | | | | | | | | | | | | | | | 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. Tested by: many (current@) MFC after: 1 week Notes: svn path=/head/; revision=281440
* psm: print newer Synaptics Touchpad capabilities.Rui Paulo2015-04-061-0/+8
| | | | Notes: svn path=/head/; revision=281127
* Quirk based support of Chromebook keyboard found in Acer C720Michael Gmelin2015-02-144-35/+123
| | | | | | | | | | | | | | | | | | This probably supports other devices based on SeaBIOS, which need to be added to the smbios based quirks table. The functionality has been ported from DragonFlyBSD and adapted to FreeBSD's more general purpose environment. Devices not covered by a quirk shouldn't be affected at all. Thanks to jhb and kostikbel for reviewing the code. Reviewed by: kostikbel, jhb Approved by: jhb, kostikbel Differential Revision: https://reviews.freebsd.org/D1802 Notes: svn path=/head/; revision=278787
* Convert from timeout(9) to callout(9).John Baldwin2014-09-221-14/+23
| | | | Notes: svn path=/head/; revision=271963
* Remove ia64.Marcel Moolenaar2014-07-071-2/+0
| | | | | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan Notes: svn path=/head/; revision=268351
* Revert r255152:Eitan Adler2013-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 Notes: svn path=/head/; revision=255210
* psm: Add support for middle and extended buttons on Synaptics touchpadsJean-Sébastien Pédron2013-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 Notes: svn path=/head/; revision=255153
* synaptics and trackpoint support are stable enough to be on by default.Eitan Adler2013-09-021-2/+2
| | | | | | | | | Eventually both options should be removed. Reviewed by: dumbbell Notes: svn path=/head/; revision=255152
* Remove a bogus re-assignment.Jung-uk Kim2013-05-131-2/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=250615
* List TrackPoint device before generic model.Jung-uk Kim2013-03-181-1/+1
| | | | Notes: svn path=/head/; revision=248479
* Add preliminary support for IBM/Lenovo TrackPoint.Jung-uk Kim2013-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 Notes: svn path=/head/; revision=248478
* Pass the device_t into atkbd_{probe,attach}_unit and get theWarner Losh2013-01-113-14/+11
| | | | | | | | controller unit and keyboard unit from there. It will be needed for other things in the future as well... Notes: svn path=/head/; revision=245315
* style(9) changes before I do more real changes.Warner Losh2013-01-111-83/+79
| | | | Notes: svn path=/head/; revision=245314
* psm: Support detection of Synaptics touchpad v7.5 and aboveJean-Sébastien Pédron2012-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 Notes: svn path=/head/; revision=244405
* Fix typo: s/protocl/protocolKevin Lo2012-09-201-2/+2
| | | | Notes: svn path=/head/; revision=240743
* Use callout(9) instead of timeout(9) to manage timers.John Baldwin2012-09-071-13/+15
| | | | Notes: svn path=/head/; revision=240211
* Add another PS/2 keyboard PNP ID. This ID is listed asJohn Baldwin2012-07-061-0/+1
| | | | | | | | | | | | "Reserved by Microsoft" in the standard PNP ID table, but has been seen in the wild on at least one laptop. PR: kern/169571 Submitted by: Matthias Apitz guru unixarea de MFC after: 3 days Notes: svn path=/head/; revision=238164