Commit Graph

27 Commits

Author SHA1 Message Date
Matthew N. Dodd
15317dd875 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
Dag-Erling Smørgrav
6b5ca0d83e Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Poul-Henning Kamp
2447bec829 Simplify cdevsw registration.
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.
1999-05-31 11:29:30 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
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.
1999-05-30 16:53:49 +00:00
Poul-Henning Kamp
52400704e9 Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
Poul-Henning Kamp
46eede0058 Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw.  bdevsw() is now an (inline)
        function.

        Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
        to the order of the cmaj/bmaj arguments!)

        Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
        (ditto!)

(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1999-05-07 10:11:40 +00:00
Eivind Eklund
505ab9b86b Staticize. 1999-04-11 02:55:52 +00:00
Nicolas Souchu
67c13fce36 Handle correctly iicbus request/release mechanism. Add iicbus allocation
to the general purpose i/o iic(4) driver.
1999-02-13 18:01:55 +00:00
Roger Hardiman
9864d54a58 Changed to use IICBUS_REPEATED_START
Submitted by:	Changed to use IICBUS_REPEATED_START
1999-02-06 10:56:09 +00:00
Roger Hardiman
84a3aec329 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Updated to support bt848 driver and MSP3400 audio chip.
This adds changes made in 1.4.2.1 and 1.4.2.2 from RELENG_3
1999-01-28 15:59:15 +00:00
Roger Hardiman
f8f3b24aa2 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Updated to support bt848 driver MSP34xx audio chip.
This adds changes made in 1.3.2.1 and 1.3.2.2 from RELENG_3
1999-01-28 15:56:18 +00:00
Roger Hardiman
6d076bb425 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Added support required by bt848 driver for MSP34xx audio chip
1999-01-28 15:50:24 +00:00
Matthew Dillon
d254af07a1 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 21:50:00 +00:00
Nicolas Souchu
bf896bd0e2 Change /dev/smb and /dev/iic interface to allow user programs to interact with
devices dynamically. That means,

        + only one /dev/iic or /dev/smb device for each smb/iic bus to access
        + I2C/SMB device address must be given to any ioctl
        + new devices may be plugged and accessed after boot, which was
          impossible previously (device addresses were hardcoded into
          the kernel)
1999-01-09 18:08:24 +00:00
Archie Cobbs
f1d19042b0 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
Nicolas Souchu
f8cf96db8f Remove broken and useless intr interface.
Submitted by: Doug Rabson <dfr@nlsystems.com>
	      Amancio Hasty <hasty@rah.star-gate.com>

Avoid compile warnings.
1998-11-22 22:01:42 +00:00
Nicolas Souchu
7d70baf7b2 Check if devclass exists for probed devices before
declaring the device 'alive'.
1998-11-08 18:42:34 +00:00
Nicolas Souchu
7a8ecb9e64 Add semicolon to INTERFACE declarations 1998-11-08 18:35:53 +00:00
Nicolas Souchu
99a6f52d8f Add iic driver iff the corresponding devclass exists. 1998-11-07 14:33:46 +00:00
Nicolas Souchu
804ec04759 Properly reset parent to get interface addr. 1998-11-04 22:07:24 +00:00
Nicolas Souchu
04f89a63cb iicbb is generic support for I2C bit-banging.
Other files: timeout management added to the I2C framework.
1998-10-31 11:31:07 +00:00
Nicolas Souchu
7da75285d5 Major number allocated for generic I2C i/o -> 105 1998-09-09 18:57:24 +00:00
Nicolas Souchu
c498ec5f46 Device registration temporaly removed until major number allocation ok. 1998-09-04 17:53:42 +00:00
Nicolas Souchu
b2dc47b48a Reviewed by: Doug Rabson
Submitted by:	nsouch
I2C and SMB ioctls
1998-09-03 21:00:08 +00:00
Nicolas Souchu
c3e2dc6b48 Submitted by: nsouch
Philips I2C bus generic support other new bus architecture.
1998-09-03 20:51:50 +00:00