Home | History | Annotate | Download | only in adb
History log of /src/sys/dev/adb/adb_ms.c
RevisionDateAuthorComments
 1.27  27-Jun-2025  andvar Grammar and spelling fixes, mainly in comments. A few in documentation,
logging, test description, and SCSI ASC/ASCQ assignment descriptions.
 1.26  16-Jun-2025  macallan tsleep/wakeup -> cv_timedwait/cv_signal
while there remove a bunch of unnecessary includes
 1.25  11-Jun-2025  macallan make this actually self-contined
- don't include machine/adbsys.h - we only needed it for a couple #defines,
none of which are arch-specific
- move all the ADB definitions to adbvar.h
 1.24  10-Jun-2025  martin Restore MSCLASS_* defines to fix the build for now - something did go wrong
in the previous commit obviously.
 1.23  10-Jun-2025  macallan properly support ancient, non-programmable MicroSpeed trackballs
with this the left and right buttons behave as expected, the middle button does
some weird toggle thing that, as far as I can tell, can't be changed.
Unlike newer models this one doesn't respond to any register writes other than
what's required for ADB device discovery and setup, the handler ID can't be
changed, and register 1 and 2 return nothing.
should probably be adapted to mac68k's ams.c
 1.22  11-Feb-2024  andvar Fix few more typos in comments and log message:
s/butoon/button/
s/BUTTOM/BOTTOM/
s/communicaiton/communication/
s/recevice/receive/
s/regiion/region/
 1.21  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20  24-Apr-2021  thorpej branches: 1.20.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.19  05-Sep-2019  macallan branches: 1.19.10;
now that I figured out how the checksum for the Kensington Turbo Mouse's
init command works:
- document it
- calculate the checksum instead of hardcoding it, so the init command can be
easily changed
- drop the first init string - it's entirely overwritten by the 2nd
- remove some debug goop
 1.18  31-Aug-2019  macallan fix Kensington Turbo Mouse support properly
- program the buttons sanely ( as left & right mouse buttons, no toggles and
no ridiculous debounce delay either ) - apparently the init values were
cargo culted from cthulhu knows where
- don't fudge buttons anymore, now that they behave sanely
- add comments on what I could figure out the init command actually does
- leave in code to find checksum values for init commands, at least until I
can figure out what exactly the checksum is
Todo: deal with models that have more than 2 buttons, figure out what the rest
of the init command does
 1.17  30-Aug-2019  macallan make Kensington Turbo Mouse ( actually a trackball ) work:
- this thing speaks EMP, act like it
- adjust the *way* excessive timeout for trying to enable EMP mode on mice -
for some reason this trackball shows up as two devices - the trackball and a
non-functional non-EMP mouse
- map both buttons to button 0 - one is an on/off switch for button 0, the
other shows up as regular button 1
 1.16  29-Oct-2014  macallan branches: 1.16.20;
actually support EMP
( as in, look for additional motion info bits, not just buttons )
 1.15  18-Nov-2013  nisimura minor tweaks to shut gcc4.8 warning off.
 1.14  27-Oct-2012  chs branches: 1.14.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.13  02-Jun-2012  dsl branches: 1.13.2;
Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
the item itself.
In the places where the caller specifies a function and a structure
address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
 1.12  18-Aug-2011  christos branches: 1.12.2;
Fix gcc-4.5 warnings. If you still see them, e-mail them to me.
 1.11  01-Aug-2011  mbalmer According to the Oxford Dictionary of Etymology, a wether is a male sheep
or ram.
 1.10  28-Jul-2011  macallan sanitize sysctl interface in order to appease gcc 4.5
 1.9  11-Aug-2010  macallan Make the movement-while-tapping threshold smaller so moving the cursor by a
few pixels won't trigger a button event. This should probably become a sysctl
knob.
While there, remove some commented out stuff and fix a typo.
 1.8  26-Mar-2008  matt branches: 1.8.4; 1.8.24; 1.8.26;
split softc/device_t
 1.7  16-Apr-2007  macallan branches: 1.7.28;
more autoconfig cosmetics
 1.6  04-Mar-2007  christos branches: 1.6.2; 1.6.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5  20-Feb-2007  macallan branches: 1.5.2;
update copyrights
 1.4  10-Feb-2007  tsutsui branches: 1.4.2;
Fix botch on newlock2 merge.
 1.3  09-Feb-2007  ad Merge newlock2 to head.
 1.2  09-Feb-2007  macallan add a sysctl to turn off tapping to button event translation, same as in
ams
 1.1  17-Jan-2007  macallan branches: 1.1.2;
new, simplified ADB drivers
 1.1.2.2  06-Feb-2007  ad Fix CVS screwup.
 1.1.2.1  17-Jan-2007  ad file adb_ms.c was added on branch newlock2 on 2007-02-06 17:10:30 +0000
 1.4.2.3  07-May-2007  yamt sync with head.
 1.4.2.2  12-Mar-2007  rmind Sync with HEAD.
 1.4.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.5.2.3  03-Sep-2007  yamt sync with head.
 1.5.2.2  26-Feb-2007  yamt sync with head.
 1.5.2.1  20-Feb-2007  yamt file adb_ms.c was added on branch yamt-lazymbuf on 2007-02-26 09:09:58 +0000
 1.6.4.1  11-Jul-2007  mjf Sync with head.
 1.6.2.1  27-May-2007  ad Sync with head.
 1.7.28.1  03-Apr-2008  mjf Sync with HEAD.
 1.8.26.1  05-Mar-2011  rmind sync with head
 1.8.24.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.8.4.1  09-Oct-2010  yamt sync with head
 1.12.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.2.1  30-Oct-2012  yamt sync with head
 1.13.2.3  03-Dec-2017  jdolecek update from HEAD
 1.13.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.2.1  18-May-2014  rmind sync with head
 1.16.20.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.10.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.20.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed