Home | History | Annotate | Download | only in pckbport
History log of /src/sys/dev/pckbport/pms.c
RevisionDateAuthorComments
 1.42  07-Dec-2024  chs pms: support PS/2 mouse hot-plug

Detect the BAT (Basic Assurance Test) result value and reset
the driver state in this case.

ok martin@
 1.41  05-Sep-2023  mrg branches: 1.41.6;
panic on an condition that shouldn't be possible.

appease GCC 12.
 1.40  28-Oct-2022  riastradh pckbport(4): C99 initializers

No functional change intended.
 1.39  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.38  24-Apr-2021  thorpej branches: 1.38.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.37  13-Jul-2018  maya branches: 1.37.16;
Add comment elaborating what a sliced command is.
 1.36  13-Aug-2017  christos branches: 1.36.2; 1.36.4;
PR/52483: Ryo ONODERA: Add support for ALPS PS/2 pointing devices
 1.35  09-Sep-2011  jakllsch branches: 1.35.12; 1.35.30;
Replace pms_synaptics_send_command() and identical pms_elantech_send_command()
with pms_sliced_command(). Linux shows that this sequence can also be used by
"Logitech PS/2++" protocol as well.
 1.34  08-Sep-2011  jakllsch Sprinkle static.
 1.33  08-Sep-2011  jakllsch Make whitespace more consistent.
 1.32  07-Sep-2011  jakllsch options PMS_DISABLE_POWERHOOK has been obsolete for a while now,
remove what little still remains of it.
 1.31  24-May-2011  joerg Use proper format string
 1.30  24-Feb-2010  dyoung branches: 1.30.2; 1.30.4;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.29  08-Jan-2010  dyoung branches: 1.29.2;
Expand PMF_FN_* macros.
 1.28  08-Mar-2009  ad use aprint_error
 1.27  14-Dec-2008  jmcneill branches: 1.27.2;
Add Elantech multi-touch driver.
 1.26  15-Mar-2008  cube branches: 1.26.4; 1.26.12; 1.26.14; 1.26.20;
Use proper types.
 1.25  15-Mar-2008  cube Split device_t and softc for pckbd(4) and pms(4).
 1.24  29-Feb-2008  dyoung Use PMF_FN_ARGS, PMF_FN_PROTO.
 1.23  28-Jan-2008  jmcneill branches: 1.23.2; 1.23.6;
Don't call do_enable on synaptics resume if !sc->sc_enabled
 1.22  09-Dec-2007  jmcneill Merge jmcneill-pm branch.
 1.21  01-Dec-2007  jmcneill branches: 1.21.2; 1.21.4;
aprintify
 1.20  19-Oct-2007  ad branches: 1.20.2;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.19  19-Jul-2007  dsl branches: 1.19.4; 1.19.6; 1.19.10; 1.19.12;
include sys/cdefs.h before opt_xxx.h
 1.18  09-Jul-2007  ad branches: 1.18.2;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.17  04-Mar-2007  christos branches: 1.17.2; 1.17.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16  16-Nov-2006  christos branches: 1.16.4;
__unused removal on arguments; approved by core.
 1.15  12-Nov-2006  plunky Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.14  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.13  24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.12  13-Sep-2006  christos branches: 1.12.2;
avoid empty if bodies.
 1.11  07-Jun-2006  kardel branches: 1.11.6;
merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
time.tv_sec -> time_second
- struct timeval mono_time is gone
mono_time.tv_sec -> time_uptime
- access to time via
{get,}{micro,nano,bin}time()
get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
 1.10  29-Mar-2006  thorpej branches: 1.10.2;
Use device_private().
 1.9  11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8  08-Nov-2005  rpaulo Add a fake entry in pms_protocols array to avoid an out-of-bounds
access in do_enable() if PMS_SYNAPTICS_TOUCHPAD and PMSDEBUG are both
defined.
 1.7  24-Oct-2005  jdolecek constify
 1.6  27-Feb-2005  perry branches: 1.6.4; 1.6.6;
nuke trailing whitespace
 1.5  27-Jan-2005  jmcneill Fix synaptics touchpad resume, from Kentaro A. Kurahone.
 1.4  18-Jan-2005  scw branches: 1.4.2;
Address PR kern/28990 by making Synaptics Touchpad support contingent
on "options PMS_SYNAPTICS_TOUCHPAD" in the kernel config file. See
the PR for details on why this is necessary.

While here, defflag PMS_DISABLE_POWERHOOK.
 1.3  24-Dec-2004  christos branches: 1.3.2;
PR/28774: Kentaro A. Kurahone: Add synaptics touchpad driver
 1.2  18-Mar-2004  bjh21 branches: 1.2.4;
ANSIfy, un-__P(), and generally KNF.
 1.1  13-Mar-2004  bjh21 Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it. This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111. The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers. To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned. Thy just use rather more function pointers than before. Tested
on i386 and (with a new host driver) acorn32. Compiled on several other
affected architectures.
 1.2.4.10  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.4.9  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.2.4.8  04-Feb-2005  skrll Sync with HEAD.
 1.2.4.7  24-Jan-2005  skrll Sync with HEAD.
 1.2.4.6  17-Jan-2005  skrll Sync with HEAD.
 1.2.4.5  28-Nov-2004  skrll Adapt to branch
 1.2.4.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.3  18-Sep-2004  skrll Sync with HEAD.
 1.2.4.2  03-Aug-2004  skrll Sync with HEAD
 1.2.4.1  18-Mar-2004  skrll file pms.c was added on branch ktrace-lwp on 2004-08-03 10:50:14 +0000
 1.3.2.1  29-Apr-2005  kent sync with -current
 1.4.2.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.2.1  12-Feb-2005  yamt sync with head.
 1.6.6.1  26-Oct-2005  yamt sync with head
 1.6.4.8  17-Mar-2008  yamt sync with head.
 1.6.4.7  04-Feb-2008  yamt sync with head.
 1.6.4.6  21-Jan-2008  yamt sync with head
 1.6.4.5  07-Dec-2007  yamt sync with head
 1.6.4.4  27-Oct-2007  yamt sync with head.
 1.6.4.3  03-Sep-2007  yamt sync with head.
 1.6.4.2  30-Dec-2006  yamt sync with head.
 1.6.4.1  21-Jun-2006  yamt sync with head.
 1.9.12.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.9.10.1  19-Apr-2006  elad sync with head.
 1.9.8.3  14-Sep-2006  yamt sync with head.
 1.9.8.2  26-Jun-2006  yamt sync with head.
 1.9.8.1  01-Apr-2006  yamt sync with head.
 1.9.6.2  22-Apr-2006  simonb Sync with head.
 1.9.6.1  04-Feb-2006  simonb Adapt for timecounters: mostly use get*time() and use "time_second"
instead of "time.tv_sec".
 1.9.4.1  09-Sep-2006  rpaulo sync with head
 1.10.2.1  19-Jun-2006  chap Sync with head.
 1.11.6.1  18-Nov-2006  ad Sync with head.
 1.12.2.2  10-Dec-2006  yamt sync with head.
 1.12.2.1  22-Oct-2006  yamt sync with head
 1.16.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.17.4.1  11-Jul-2007  mjf Sync with head.
 1.17.2.5  23-Oct-2007  ad Sync with head.
 1.17.2.4  12-Oct-2007  ad Fix merge errors.
 1.17.2.3  13-May-2007  ad - Pass the error number and residual count to biodone(), and let it handle
setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.
 1.17.2.2  10-Apr-2007  ad Nuke the deferred kthread creation stuff, as it's no longer needed.
Pointed out by thorpej@.
 1.17.2.1  09-Apr-2007  ad - Add two new arguments to kthread_create1: pri_t pri, bool mpsafe.
- Fork kthreads off proc0 as new LWPs, not new processes.
 1.18.2.1  15-Aug-2007  skrll Sync with HEAD.
 1.19.12.2  19-Jul-2007  dsl include sys/cdefs.h before opt_xxx.h
 1.19.12.1  19-Jul-2007  dsl file pms.c was added on branch matt-mips64 on 2007-07-19 22:18:55 +0000
 1.19.10.1  25-Oct-2007  bouyer Sync with HEAD.
 1.19.6.3  23-Mar-2008  matt sync with HEAD
 1.19.6.2  09-Jan-2008  matt sync with HEAD
 1.19.6.1  06-Nov-2007  matt sync with HEAD
 1.19.4.6  08-Dec-2007  jmcneill Rename pnp(9) -> pmf(9), as requested by many.
 1.19.4.5  01-Dec-2007  jmcneill Sync with HEAD.
 1.19.4.4  06-Nov-2007  joerg Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
three layers (class logic, device logic, bus logic), all of them being
optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
not suspended (even partially), device_is_enabled returns true if the
device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
pnp_system_resume. Before running any suspend/resume handlers, check
that all currently attached devices support power management and bail
out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
can register what events they are interested in and whether the handler
should be global or not.
- Introduce device_active API for devices to mark themselve in use from
either the system or the device. Use this to implement the idle handling
for audio and input devices. This is intended to replace most ad-hoc
watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.
 1.19.4.3  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.19.4.2  02-Oct-2007  joerg Fix build with PMS_DISABLE_POWERHOOK.
 1.19.4.1  03-Aug-2007  jmcneill Pull in power management changes from private branch.
 1.20.2.3  18-Feb-2008  mjf Sync with HEAD.
 1.20.2.2  27-Dec-2007  mjf Sync with HEAD.
 1.20.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.21.4.1  11-Dec-2007  yamt sync with head.
 1.21.2.1  26-Dec-2007  ad Sync with head.
 1.23.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.23.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.23.2.1  24-Mar-2008  keiichi sync with head.
 1.26.20.1  21-Apr-2010  matt sync to netbsd-5
 1.26.14.2  30-Jan-2010  snj Pull up following revision(s) (requested by hubertf in ticket #1282):
sys/dev/pckbport/pckbd.c: revision 1.26
sys/dev/pckbport/pms.c: revision 1.28
use aprint_error
 1.26.14.1  13-Sep-2009  snj Pull up following revision(s) (requested by jmcneill in ticket #943):
sys/dev/pckbport/files.pckbport: revision 1.7
sys/dev/pckbport/elantech.c: revision 1.1
sys/dev/pckbport/elantechreg.h: revision 1.1
sys/dev/pckbport/elantechvar.h: revision 1.1
sys/dev/pckbport/pms.c: revision 1.27
sys/dev/pckbport/pmsvar.h: revision 1.8
Add Elantech multi-touch driver.
 1.26.12.2  28-Apr-2009  skrll Sync with HEAD.
 1.26.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.26.4.2  11-Mar-2010  yamt sync with head
 1.26.4.1  04-May-2009  yamt sync with head.
 1.27.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.29.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.30.4.1  06-Jun-2011  jruoho Sync with HEAD.
 1.30.2.1  31-May-2011  rmind sync with head
 1.35.30.1  28-Aug-2017  skrll Sync with HEAD
 1.35.12.1  03-Dec-2017  jdolecek update from HEAD
 1.36.4.1  10-Jun-2019  christos Sync with HEAD
 1.36.2.1  28-Jul-2018  pgoyette Sync with HEAD
 1.37.16.1  23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.38.8.1  04-Aug-2021  thorpej Adapt to CFARGS().
 1.41.6.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed