aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mse
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some style bugs in the removal of __P(()). The main ones wereBruce Evans2002-03-231-19/+14
| | | | | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases. Notes: svn path=/head/; revision=93024
* Remove __P.Alfred Perlstein2002-03-201-29/+29
| | | | Notes: svn path=/head/; revision=92765
* KSE Milestone 2Julian Elischer2001-09-121-9/+9
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Revert previous "fix"; bus mice still have to be manually probed even inMike Smith2001-08-311-1/+1
| | | | | | | | | the presence of PnP data. Submitted by: yokota Notes: svn path=/head/; revision=82618
* Correct usage of ISA_PNP_PROBEMike Smith2001-08-301-2/+2
| | | | Notes: svn path=/head/; revision=82554
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-261-1/+0
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* Finish deprecating <sys/select.h> in favor of <sys/selinfo.h> in kernel code.Garrett Wollman2001-01-201-1/+1
| | | | Notes: svn path=/head/; revision=71286
* Initiate deorbit burn sequence for <machine/mouse.h>.Poul-Henning Kamp2000-10-091-1/+1
| | | | | | | | | | | | | Replace all in-tree uses with <sys/mouse.h> which repo-copied a few moments ago from src/sys/i386/include/mouse.h by peter. This is also the appropriate fix for exo-tree sources. Put warnings in <machine/mouse.h> to discourage use. November 15th 2000 the warnings will be converted to errors. January 15th 2001 the <machine/mouse.h> files will be removed. Notes: svn path=/head/; revision=66860
* - `Newbus'ified the driver.Kazutaka YOKOTA2000-03-181-124/+283
| | | | | | | | | | | - Properly keep track of resources (I/O ports and irq). - Use bus_space_read/write() to access the ports. - Add PnP IDs. - Add a watchdog timer in case interrupts are lost (experimental). - Add `detach' function (experimental). Notes: svn path=/head/; revision=58229
* Remove a bunch of unused (NO-OP) #if NFOO > 0 type includes and somePeter Wemm2000-01-291-3/+0
| | | | | | | #include "foo.h" headers. Notes: svn path=/head/; revision=56845
* - Remove cdevsw_add().Kazutaka YOKOTA1999-10-061-3/+0
| | | | Notes: svn path=/head/; revision=51966
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-251-5/+0
| | | | | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-08-231-18/+3
| | | | | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev(). Notes: svn path=/head/; revision=50254
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-311-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up. Notes: svn path=/head/; revision=47640
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-301-5/+22
| | | | | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. Notes: svn path=/head/; revision=47625
* Fix up a few easy 'assignment used as truth value' and 'suggest parensPeter Wemm1999-05-061-4/+6
| | | | | | | | around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately. Notes: svn path=/head/; revision=46571
* Add sufficient braces to keep egcs happy about potentially ambiguousPeter Wemm1999-05-061-3/+3
| | | | | | | if/else nesting. Notes: svn path=/head/; revision=46568
* s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/.Dmitrij Tejblum1999-04-281-2/+2
| | | | | | | (Edited automatically) Notes: svn path=/head/; revision=46153
* Initialize isa_devtab entries for interrupt handlers in individualBruce Evans1998-10-221-2/+4
| | | | | | | | | | device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet. pc98 parts approved by: kato Notes: svn path=/head/; revision=40565
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.Eivind Eklund1998-01-241-1/+3
| | | | | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow. Notes: svn path=/head/; revision=32726
* - Add support for the following mice to psm/moused/sysmouse:Kazutaka YOKOTA1997-12-071-20/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll, Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII MieMouse, Logitech MouseMan+, FirstMouse+ - The `psm' driver is made to recognize various models of PS/2 mice and enable their extra features so that their additional buttons and wheel/roller are recognized. The name of the detected model will be printed at boot time. - A set of new ioctl functions are added to the `psm', `mse' and `sysmouse' drivers so that the userland program (such as the X server) can query device information and change driver settings. - The wheel/roller movement is handled as the `Z' axis movement by the mouse drivers and the moused daemon. The Z axis movement may be mapped to another axis movement or buttons. - The mouse drivers support a new, standard mouse data format, MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement and up to 10 buttons. /sys/i386/include/mouse.h - Added some fields to `mousestatus_t' to store Z axis movement and flag bits. - Added the field `model' to `mousehw_t' to store mouse model code. Defined model codes. - Extended `mousemode_t'. - Added new protocols and some constants for them. - Added new ioctl functions and structures. - Removed obsolete ioctl definitions. /sys/i386/include/console.h - Added `dz' field to the structure `mouse_data' to pass Z axis movement to `syscons/sysmouse'. - Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON. Use button bits defined in `mouse.h' instead. /sys/i386/isa/psm.c - Added a set of functions to detect various mice which have additional features (wheel and buttons) unavailable in the standard PS/2 mouse. - Refined existing ioctl functions and added new ones. Most important of all is MOUSE_SETLEVEL which manipulates the output level of the driver. While the output level remains zero, the output from the `psm' driver is in the standard PS/2 mouse format (three bytes long). When the level is set to one, the `psm' driver will send data in the extended format. At the level two the driver uses the format which is native to the connected mouse is used. (Meaning that the output from the device is passed to the caller as is, unmodified.) The `psm' driver will pass such extended data format as is to the caller if the output level is two, but emulates the standard format if the output level is zero. - Added kernel configuration flags to set initial resolution (PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL). - Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION. Acceleration ratio is now specified by the kernel configuration flags stated above. Sync check logic is refined and now standard. The sync check can be turned off by the new kernel configuration flags PSM_CONFIG_NOCHECKSYNC (0x100). PSM_EMULATION has been of little use. - Summer clean up :-) Removed unused code and obsolete comments. /sys/i386/isa/mse.c - Created mseioctl() to deal with ioctl functions MOUSE_XXXX. Most importantly, the MOUSE_SETLEVEL ioctl will change the output format from the 5 byte format to the new, extended format so that the caller can take advantage of Z axis movement and additional buttons. - Use constants defined in `mouse.h' rather than magic numbers. /sys/i386/isa/syscons.c - Changed scioctl() to reflect the new `console.h' and some of the new ioctls defined in `mouse.h'. Most importantly, the MOUSE_SETLEVEL ioctl will change the `sysmouse' output format from the MouseSystems 5 byte format to the new, extended format so that the caller can take advantage of Z axis movement and additional buttons. - Added support for double/triple click actions of the left button and single click action of the right button in the virtual console. The left button double click will select a word under the mouse pointer. The triple click will select a line and the single click of the right button will extend the selected region to the current position of the mouse pointer. This will make the cut/paste support more compatible with xterm. /sys/i386/isa/kbdio.h - Added PSM_INTELLI_ID. Notes: svn path=/head/; revision=31603
* Get select stuff by #including <sys/select.h> instead of <sys/proc.h>.Bruce Evans1997-11-181-2/+2
| | | | Notes: svn path=/head/; revision=31254
* Update select -> poll in drivers.Peter Wemm1997-09-141-17/+21
| | | | Notes: svn path=/head/; revision=29368
* Removed unused #includes.Bruce Evans1997-07-201-2/+1
| | | | Notes: svn path=/head/; revision=27555
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includeBruce Evans1997-03-241-2/+1
| | | | | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient. Notes: svn path=/head/; revision=24203
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Test in mseopen() whether the device has been configured at all, andJoerg Wunsch1996-12-191-1/+4
| | | | | | | | | | | refuse the open intent with ENXIO otherwise. Closes PR # bin/2226. Reviewed by: bde Notes: svn path=/head/; revision=20688
* Remove devconf, it never grew up to be of any use.Poul-Henning Kamp1996-09-061-27/+1
| | | | Notes: svn path=/head/; revision=18084
* Removed recently introduced unnecessary #includes of <machine/cpu.h>Bruce Evans1996-06-081-4/+1
| | | | | | | (bootverbose isn't there in -current) and nearby unnecessary #includes. Notes: svn path=/head/; revision=16211
* Hide the ``wrong signature'' message behind bootverbose. It'sJoerg Wunsch1996-06-021-2/+4
| | | | | | | annoying for people who don't have a bus mouse. Notes: svn path=/head/; revision=16074
* Switched from using devfs_add_sw() to using devfs_add_swf()Marc G. Fournier1996-03-281-12/+7
| | | | | | | Reviewed by: julian@freebsd.org Notes: svn path=/head/; revision=14873
* Completed function declarations and/or added prototypes and/or addedBruce Evans1995-12-151-12/+20
| | | | | | | #includes to get prototypes. Notes: svn path=/head/; revision=12854
* Removed duplicated #includes of <sys/conf.h>Bruce Evans1995-12-151-2/+1
| | | | Notes: svn path=/head/; revision=12852
* Staticize and cleanup.Poul-Henning Kamp1995-12-101-4/+3
| | | | Notes: svn path=/head/; revision=12724
* Julian forgot to make the *devsw structures static.Poul-Henning Kamp1995-12-081-2/+2
| | | | Notes: svn path=/head/; revision=12678
* Pass 3 of the great devsw changesJulian Elischer1995-12-081-33/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :) Notes: svn path=/head/; revision=12675
* Removed unnecessary #includes of <sys/user.h>. Some of these were justBruce Evans1995-12-061-2/+2
| | | | | | | | | | to get the definitions of TRUE and FALSE which happen to be defined in a deeply nested include. Added nearby #includes of <sys/conf.h> where appropriate. Notes: svn path=/head/; revision=12658
* If you're going to mechanically replicate something in 50 filesJulian Elischer1995-11-291-2/+2
| | | | | | | it's best to not have a (compiles cleanly) typo in it! (sigh) Notes: svn path=/head/; revision=12521
* OK, that's it..Julian Elischer1995-11-291-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts) Notes: svn path=/head/; revision=12517
* the second set of changes in a move towards getting devices to beJulian Elischer1995-11-281-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | totally dynamic. this is only the devices in i386/isa I'll do more tomorrow. they're completely masked by #ifdef JREMOD at this stage... the eventual aim is that every driver will do a SYSINIT at startup BEFORE the probes, which will effectively link it into the devsw tables etc. If I'd thought about it more I'd have put that in in this set (damn) The ioconf lines generated by config will also end up in the device's own scope as well, so ioconf.c will eventually be gutted the SYSINIT call to the driver will include a phase where the driver links it's ioconf line into a chain of such. when this phase is done then the user can modify them with the boot: -c config menu if he wants, just like now.. config will put the config lines out in the .h file (e.g. in aha.h will be the addresses for the aha driver to look.) as I said this is a very small first step.. the aim of THIS set of edits is to not have to edit conf.c at all when adding a new device.. the tabe will be a simple skeleton.. when this is done, it will allow other changes to be made, all teh time still having a fully working kernel tree, but the logical outcome is the complete REMOVAL of the devsw tables. By the end of this, linked in drivers will be exactly the same as run-time loaded drivers, except they JUST HAPPEN to already be linked and present at startup.. the SYSINIT calls will be the equivalent of the "init" call made to a newly loaded driver in every respect. For this edit, each of the files has the following code inserted into it: obviously, tailored to suit.. ----------------------somewhere at the top: #ifdef JREMOD #include <sys/conf.h> #define CDEV_MAJOR 13 #define BDEV_MAJOR 4 static void sd_devsw_install(); #endif /*JREMOD */ ---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT #ifdef JREMOD sd_devsw_install(); #endif /*JREMOD*/ -----------------------at the bottom: #ifdef JREMOD struct bdevsw sd_bdevsw = { sdopen, sdclose, sdstrategy, sdioctl, /*4*/ sddump, sdsize, 0 }; struct cdevsw sd_cdevsw = { sdopen, sdclose, rawread, rawwrite, /*13*/ sdioctl, nostop, nullreset, nodevtotty,/* sd */ seltrue, nommap, sdstrategy }; static sd_devsw_installed = 0; static void sd_devsw_install() { dev_t descript; if( ! sd_devsw_installed ) { descript = makedev(CDEV_MAJOR,0); cdevsw_add(&descript,&sd_cdevsw,NULL); #if defined(BDEV_MAJOR) descript = makedev(BDEV_MAJOR,0); bdevsw_add(&descript,&sd_bdevsw,NULL); #endif /*BDEV_MAJOR*/ sd_devsw_installed = 1; } } #endif /* JREMOD */ Notes: svn path=/head/; revision=12502
* Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up theBruce Evans1995-11-041-2/+1
| | | | | | | | | | | | | misplaced extern declarations (mostly prototypes of interrupt handlers) that this exposed. The prototypes should be moved back to the driver sources when the functions are staticalized. Added idempotency guards to <machine/conf.h>. "ioconf.h" can't be included when building LKMs so define a wart in bsd.kmod.mk to help guard against including it. Notes: svn path=/head/; revision=12080
* Fix benign type mismatches in devsw functions. 82 out of 299 devswBruce Evans1995-09-081-6/+11
| | | | | | | functions were wrong. Notes: svn path=/head/; revision=10624
* Don't include <sys/tty.h> in drivers that aren't tty drivers or in generalBruce Evans1995-07-161-2/+1
| | | | | | | files that don't depend on the internals of <sys/tty.h> Notes: svn path=/head/; revision=9540
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-10/+10
| | | | Notes: svn path=/head/; revision=8876
* Add a class field to devconf and mst drivers.Garrett Wollman1995-04-121-22/+26
| | | | | | | | | | | | | | | For those where it was easy, drivers were also fixed to call dev_attach() during probe rather than attach (in keeping with the new design articulated in a mail message five months ago). For a few that were really easy, correct state tracking was added as well. The `fd' driver was fixed to correctly fill in the description. The CPU identify code was fixed to attach a `cpu' device. The code was also massively reordered to fill in cpu_model with somethingremotely resembling what identifycpu() prints out. A few bytes saved by using %b to format the features list rather than lots of ifs. Notes: svn path=/head/; revision=7780
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'Bruce Evans1995-03-281-1/+3
| | | | | | | | (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before. Notes: svn path=/head/; revision=7430
* From: Lars Fredriksen <fredriks@mcs.com>Jordan K. Hubbard1994-11-081-7/+43
| | | | | | | | | | Here is the improved probe for the mse (Bus Mouse) device driver. I have been running with this under 1.1.5.1 as well as 2.0 without a hitch for quite a while. Submitted by: lars Notes: svn path=/head/; revision=4259