summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Pass the device_t into atkbd_{probe,attach}_unit and get theimp2013-01-113-14/+11
| | | | | controller unit and keyboard unit from there. It will be needed for other things in the future as well...
* style(9) changes before I do more real changes.imp2013-01-111-83/+79
|
* 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
|
* Add another PS/2 keyboard PNP ID. This ID is listed asjhb2012-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
* Add a PNP ID for Japanese 106-key keyboard.jkim2012-03-281-0/+1
| | | | | PR: kern/166459 MFC after: 3 days
* - 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.
* Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.ed2011-07-171-0/+1
| | | | | | | | | Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls to support wide characters. I created a patch to add ABI compatibility for the old calls, but I didn't get any feedback to that. It seems now people are upgrading from 8 to 9 they experience this issue, so add it anyway.
* Correct a typo.delphij2011-06-201-1/+1
| | | | | Submitted by: Fabian Keil <fk fabiankeil de> MFC after: 3 days
* Add comments about the validation.delphij2011-06-111-0/+9
|
* Validate INT 15h and 16h vectors more strictly. Traditionally these entryjkim2011-06-061-1/+2
| | | | | | | | | | | | | | | | | | | points are fixed addresses and (U)EFI CSM specification also mandated that. Unfortunately, (U)EFI CSM specification does not specifically mention this is to call service routine via interrupt vector table or to jump directly to the entry point. As a result, some CSM seems to install two routines and acts differently, depending on how it was executed, unfortunately. When INT 15h is used, it calls a function pointer (which is probably a UEFI service function). When it jumps directly to the entry point, it executes a simple and traditional INT 15h service routine. Therefore, actually there are two possible fixes, i. e., this fix or jumping directly to the fixed entry point. However, we chose this fix because a) keyboard typematic support via BIOS is becoming extremely rarer and b) we cannot support random service routine installed by a firmware or a boot loader. This should fix Lenovo X220 laptop, specifically. Reviewed by: delphij MFC after: 3 days
* Revert r222152. The root cause was analysed and better fix is upcoming.jkim2011-06-062-4/+0
| | | | Discussed with: delphij
* Add a new knob to atkbd(4) to enable typematic rate detection on boot,delphij2011-05-202-0/+4
| | | | | | | | | which is now disabled by default. The detection is known to cause hangs on boot with some new Lenovo laptops on FreeBSD/amd64. Reported by: gnn Discussed with: jkim MFC after: 3 months
* Only use the BIOS-supplied IRQ for the atkbdc device for a child atkbdjhb2010-12-211-8/+10
| | | | | | device. Specifically, do not reuse it for a child psm device. Tested by: many
* Merge amd64 and i386 bus.h and move the resulting header to x86. Replacetijl2010-12-201-4/+2
| | | | | | | | | the original amd64 and i386 headers with stubs. Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere. Reviewed by: imp (previous version), jhb Approved by: kib (mentor)
* - If the atkbdc device is assigned an IRQ resource by ACPI or the PnPBIOS,jhb2010-12-163-14/+55
| | | | | | | | | | allow the child atkbd device to reuse that IRQ resource instead of reallocating the same IRQ from the parent bus inside the atkbd driver. - Don't allocate a shared IRQ for the atkbd driver. For AT keyboard devices on an ISA bus the IRQ is not shareable. Instead, the bus driver should mark the IRQ shareable if the bus supports shared IRQs. - Don't identify child devices until after the atkbdc device itself has attached.
* - 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
|
* bus_add_child: change type of order parameter to u_intavg2010-09-101-2/+2
| | | | | | | | | | This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds. Followup to: r212213 MFC after: 10 days
* Let psm(4) use si_drv1 to refer to its softc.ed2010-09-091-28/+22
|
* On certain chipsets AT keyboard controller isn't present and issobomax2010-04-294-16/+69
| | | | | | | | | | | | | | | | | | | | emulated by BIOS using SMI interrupt. On those chipsets reading from the status port may be thousand times slower than usually. Sometimes this emilation is not working properly resulting in commands timing out and since we assume that inb() operation takes very little time to complete we need to adjust number of retries to keep waiting time within a designed limits (100ms). Measure time it takes to make read_status() call and adjust number of retries accordingly. To keep it simple, use TSC to measure inb() performance and keep it to amd64-only, since TSC may not available on older CPUs. Also enable detection of the AT controller absence on amd64. Reviewed by: jhb MFC after: 1 month
* 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>
* Rewrite x86bios and update its dependent drivers.jkim2009-10-191-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not map entire real mode memory (1MB). Instead, we map IVT/BDA and ROM area separately. Most notably, ROM area is mapped as device memory (uncacheable) as it should be. User memory is dynamically allocated and free'ed with contigmalloc(9) and contigfree(9). Remove now redundant and potentially dangerous x86bios_alloc.c. If this emulator ever grows to support non-PC hardware, we may implement it with rman(9) later. - Move all host-specific initializations from x86emu_util.c to x86bios.c and remove now unnecessary x86emu_util.c. Currently, non-PC hardware is not supported. We may use bus_space(9) later when the KPI is fixed. - Replace all bzero() calls for emulated registers with more obviously named x86bios_init_regs(). This function also initializes DS and SS properly. - Add x86bios_get_intr(). This function checks if the interrupt vector is available for the platform. It is not necessary for PC-compatible hardware but it may be needed later. ;-) - Do not try turning off monitor if DPMS does not support the state. - Allocate stable memory for VESA OEM strings instead of just holding pointers to them. They may or may not be accessible always. Fix a memory leak of video mode table while I am here. - Add (experimental) BIOS POST call for vesa(4). This function calls VGA BIOS POST code from the current VGA option ROM. Some video controllers cannot save and restore the state properly even if it is claimed to be supported. Usually the symptom is blank display after resuming from suspend state. If the video mode does not match the previous mode after restoring, we try BIOS POST and force the known good initial state. Some magic was taken from NetBSD (and it was taken from vbetool, I believe.) - Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4) to identify who owns the VESA BIOS. This is very useful for multi-display adapter setup. By default, the POST video controller is automatically probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding vgapci unit number. You may override it from loader but it is very unlikely to be necessary. Unfortunately only AGP/PCI/PCI-E controllers can be matched because ISA controller does not have necessary device IDs. - Fix a long standing bug in state save/restore function. The state buffer pointer should be ES:BX, not ES:DI according to VBE 3.0. If it ever worked, that's because BX was always zero. :-) - Clean up register initializations more clearer per VBE 3.0. - Fix a lot of style issues with vesa(4).
* Fix couple of style nits missed in the previous commit.jkim2009-09-251-1/+1
|
* - Use x86bios_offset() instead of BIOS_PADDRTOVADDR() macro.[1]jkim2009-09-251-14/+23
| | | | | | | | | | | | | | | - Clear all registers before calling real mode interrupt handlers as we did for dpms and vesa and re-enable the function as it should be fixed by this. - Tidy up register access. For example, when we call INT 0x15, AH=0xc0, we used to initialize AX=0xc000 to clear AL at the same time but it is very confusing. We don't have to do this any more because we are explicitly clearing all registers now. - Check size of system configuration table although it is almost always 8. This is to make sure we are not reading some random low physical memory. Hopefully it is just zero in that case. :-) - Fix some style nits and add more comments. Submitted by: paradox (ddkprog yahoo com)[1]
* - Use FreeBSD function naming convention.jkim2009-09-241-3/+3
| | | | | | | - Change x86biosCall() to more appropriate x86bios_intr().[1] Discussed with: delphij, paradox (ddkprog yahoo com) Submitted by: paradox (ddkprog yahoo com)[1]
* Move sys/dev/x86bios to sys/compat/x86bios.jkim2009-09-231-1/+1
| | | | | | It may not be optimal but it is clearly better than the old place. OK'ed by: delphij, paradox (ddkprog yahoo com)
* Temporarily disable typematic retrieving code until we get a real fix,delphij2009-09-221-2/+2
| | | | | | | which currently causes hangs in some configurations. Reported by: joel Submitted by: swell.k at gmail.com
* Allow atkbd to obtain keyboard repeat rate from BIOS on amd64.delphij2009-09-211-19/+18
| | | | Submitted by: swell.k at gmail.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)
* Prevent atkbd(4) interrupt handler from calling keyboard callback functionemax2009-04-171-2/+4
| | | | | | | | | | when polled mode is enabled. This should help with duplicated/missing characters problem at mountroot, geli, etc. prompts on multi CPU systems while kbdmux(4) is enabled. Tested by: Tobias Grosser <grosser -at- fim -dot- uni-passau -dot- de> Tested by: Fabian Keil <freebsd-listen -at- fabiankeil -dot- de> MFC after: 3 days
* Teach psm about O_ASYNCrnoland2009-03-161-0/+23
| | | | | | This makes Xorg happy if you aren't using moused. MFC after: 3 days
* bus_add_child takes a const char *.imp2009-02-051-3/+3
|
* 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
OpenPOWER on IntegriCloud