Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/atari/dev/kbd.c
RevisionDateAuthorComments
 1.59  08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.58  26-Jun-2023  andvar s/privious/previous/ in comment.
 1.57  06-Jan-2023  tsutsui TAB/spaces/indents cleanup.
 1.56  26-Jun-2022  martin gcc is not smart enough to track the equivalence of conditions used
here and warns about an unused value - initialize "code" always.
 1.55  26-Jun-2022  tsutsui Restore redundant register accesses as the original implementation did.

It looks my refactored one for entropy sometimes returns unexpected
values and they cause "kbd: Unknown packet 0xfd" errors and missing
keyboard release events.
 1.54  25-Jun-2022  tsutsui Add rnd(9) entropy source from keyboard and mouse.
 1.53  25-Jun-2022  tsutsui Use aprint_*(9) for device attach messages.
 1.52  25-Jun-2022  tsutsui Rename and reformat softc stuff for readablity, and misc more cleanups.

No binary change.
 1.51  25-Jun-2022  tsutsui Move declarations to proper places.
 1.50  25-Jun-2022  tsutsui Misc cleanup. No functional changes, no regression on TT030.

- KNF and TAB/space
- make local functions static
- avoid unnesessary __USE()
- use proper integer types
- remove a register keyword
 1.49  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.48  24-Apr-2021  thorpej branches: 1.48.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.47  08-Feb-2018  dholland branches: 1.47.18;
Typos.
 1.46  18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.45  25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.44  24-Mar-2014  christos branches: 1.44.2;
- remove unused
- use cpu_{g,s}etmodel() (not committed yet)
 1.43  16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.42  05-Jun-2011  tsutsui branches: 1.42.2; 1.42.12; 1.42.16;
- use CFATTACH_DECL_NEW() (no softc)
- use device_t, cfdata_t etc.
 1.41  13-Apr-2010  tsutsui branches: 1.41.2; 1.41.6;
Misc KNF.
 1.40  25-Nov-2009  abs branches: 1.40.2; 1.40.4;
Fix a missed proc -> lwp change, only compiled if NWSKBD
 1.39  03-Jul-2009  tsutsui Replace one traditional MD si_callback() with MI softint(9).
 1.38  03-Jul-2009  tsutsui Use more uint8_t, and constify.
 1.37  03-Jul-2009  tsutsui KNF, use uint8_t, and misc cosmetics.
 1.36  18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.35  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.34  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.33  14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.32  17-Jan-2009  tsutsui branches: 1.32.2;
Use firm_gettime() to retain compatibility with old firm_event. From amiga.
 1.31  08-Jan-2008  joerg branches: 1.31.6; 1.31.10; 1.31.18;
Convert Atari to generic TODR and timecounter.
 1.30  04-Mar-2007  christos branches: 1.30.20; 1.30.26; 1.30.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.29  11-Dec-2005  christos branches: 1.29.26;
merge ktrace-lwp.
 1.28  25-Mar-2004  leo branches: 1.28.16;
Licence cleanup (suggested by wiz).
 1.27  21-Sep-2003  jdolecek cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
the owner of descriptor, according to appropriate sematics
of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
 1.26  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.25  15-Jul-2003  lukem __KERNEL_RCSID()
 1.24  04-Feb-2003  leo branches: 1.24.2;
NUL -> NULL.
 1.23  02-Feb-2003  thomas WS keyboard support for atari native keyboards.
 1.22  23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.21  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.20  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.19  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.18  06-Aug-1999  leo branches: 1.18.14; 1.18.16; 1.18.20; 1.18.28;
Change the way that bit's are cleared in the InterruptPending register of
the 68901. Do this now by _assigning_ ~<bit_to_clear> instead of the
previously used 'andb ~<bit_to_clear>'. The latter caused a rwm-cycle that
caused a race condition to happen when an interrupt arrived between the
Read and Modify-Write.
Anyway, this solved my hanging keyboard problem.
 1.17  12-Jan-1998  thorpej Update for changes to config.
 1.16  29-Jun-1997  leo Add code to set pitch and duration of the keyboard bell. (Thomas Gerner).
 1.15  10-Jan-1997  leo Handle keyboard modifiers *before* handing the keycodes to either the
console driver or the DDB keyboard functions. This prevents annoyances
with out of sync modifier stati.
 1.14  20-Dec-1996  leo Get rid of BROKEN_INDIRECT_CONFIG
 1.13  16-Oct-1996  leo select -> poll
 1.12  13-Oct-1996  christos backout previous kprintf changes
 1.11  11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10  18-Apr-1996  leo Yet more prototyping and -Wall fixes.
 1.9  12-Apr-1996  leo Add 3-button mouse support.
 1.8  27-Mar-1996  leo Small nits because of changes in ym2149 handling.
 1.7  17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.6  22-Feb-1996  leo First bunch of changes due to stricter prototype checking.
 1.5  26-Jun-1995  leo Fix thinko. It will now also work when no mouse is configured.
 1.4  25-Jun-1995  leo Mouse driver added.
 1.3  09-Jun-1995  leo Handle mouse and other packages received from the keyboard correctly.
The initialisation now resets the keyboard and disables all packages
that make no sense because their drivers are not activated.
 1.2  10-Apr-1995  mycroft Nuke kbdwrite().
 1.1  26-Mar-1995  leo branches: 1.1.1;
Initial revision
 1.1.1.1  26-Mar-1995  leo NetBSD/Atari, port by Leo Weppelman.
 1.18.28.1  17-May-2002  gehenna Add device switch.
 1.18.20.3  11-Nov-2002  nathanw Catch up to -current
 1.18.20.2  18-Oct-2002  nathanw Catch up to -current.
 1.18.20.1  17-Sep-2002  nathanw Catch up to -current.
 1.18.16.2  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.18.16.1  09-Sep-2001  thorpej Add kqueue support (not yet compiled).
 1.18.14.1  10-Oct-2001  fvdl Convert all remaining devices.
 1.24.2.4  17-Jan-2005  skrll Adapt to branch.
 1.24.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1  03-Aug-2004  skrll Sync with HEAD
 1.28.16.3  21-Jan-2008  yamt sync with head
 1.28.16.2  03-Sep-2007  yamt sync with head.
 1.28.16.1  21-Jun-2006  yamt sync with head.
 1.29.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.30.32.1  08-Jan-2008  bouyer Sync with HEAD
 1.30.26.1  18-Feb-2008  mjf Sync with HEAD.
 1.30.20.1  23-Mar-2008  matt sync with HEAD
 1.31.18.2  28-Apr-2009  skrll Sync with HEAD.
 1.31.18.1  19-Jan-2009  skrll Sync with HEAD.
 1.31.10.4  11-Aug-2010  yamt sync with head.
 1.31.10.3  11-Mar-2010  yamt sync with head
 1.31.10.2  18-Jul-2009  yamt sync with head.
 1.31.10.1  04-May-2009  yamt sync with head.
 1.31.6.1  17-Jan-2009  mjf Sync with HEAD.
 1.32.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.40.4.2  12-Jun-2011  rmind sync with head
 1.40.4.1  30-May-2010  rmind sync with head
 1.40.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.41.6.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.41.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.42.16.1  18-May-2014  rmind sync with head
 1.42.12.2  03-Dec-2017  jdolecek update from HEAD
 1.42.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.42.2.1  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.44.2.1  10-Aug-2014  tls Rebase.
 1.47.18.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.48.8.1  03-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed