Home | History | Annotate | Download | only in ppbus
History log of /src/sys/dev/ppbus/ppbus_conf.c
RevisionDateAuthorComments
 1.23  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22  24-Apr-2021  thorpej branches: 1.22.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.21  27-Dec-2019  msaitoh branches: 1.21.10;
s/sucess/success/ in comment.
 1.20  27-Oct-2012  chs branches: 1.20.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.19  13-May-2011  rmind branches: 1.19.4; 1.19.14;
Eliminate few references to ltsleep.
 1.18  11-Nov-2009  he branches: 1.18.4; 1.18.6;
Make this actually build, as part of the sgimips GENERIC32_IP2x kernel.
 1.17  07-Nov-2009  dyoung Don't deactivate a child before detaching it, that's not necessary.

Don't take a device off of the ppbus(4)'s list of children in the
detach routine, but add a child-detachment hook that does it for
us. As a nice side-effect, we can probably detach ppbus(4) children
with drvctl(8), now.

Compile-tested, only.

XXX Does anybody even use ppbus(4)? It's not even in the ALL
XXX configuration for i386!
 1.16  29-Apr-2008  cegger gpio(4): Extend with open/close to request/release the ppbus(4) on open/close.
ppbus(4): Extend to attach on gpiobus.
From Hans Rosenfeld from tech-kern:
http://mail-index.netbsd.org/tech-kern/2008/04/28/msg001168.html
Hint: Hans sent me this diff which differs in the one from tech-kern in:
- 2-clause license
- sprinkled some consts
 1.15  18-Apr-2008  cegger branches: 1.15.2; 1.15.4;
Fix panics at boot and some other misc bugs. From Hans Rosenfeld.
 1.14  15-Apr-2008  cegger device_t / softc split. From Hans Rosenfeld
 1.13  08-Apr-2008  cegger use aprint_*_dev and device_xname
 1.12  05-Dec-2007  ad branches: 1.12.12;
lockmgr -> mutex
 1.11  29-Mar-2006  thorpej branches: 1.11.32; 1.11.34; 1.11.40; 1.11.44;
Use device_pprivate().
 1.10  25-Mar-2006  thorpej Use device_parent().
 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  26-Aug-2005  drochner s/locdesc_t/int/g
 1.7  27-Feb-2005  perry branches: 1.7.4;
nuke trailing whitespace
 1.6  13-Sep-2004  drochner branches: 1.6.4; 1.6.6;
remove the ppbus_print_child() function which is pointless as used here
 1.5  08-Sep-2004  drochner use interface attribute / locator passing versions
of config_search(),
and some KNF/whitespace cleanup
no functional changes
 1.4  01-Feb-2004  jdolecek branches: 1.4.4;
make compilable with option DONTPROBE_1284
 1.3  25-Jan-2004  bjh21 Remove dollar signs from foreign RCSIDs per doc/3RDPARTY.
Add __KERNEL_RCSID() to .c files.
 1.2  21-Jan-2004  bjh21 Add RCSID comments.
 1.1  19-Jan-2004  jdolecek branches: 1.1.1;
Initial revision
 1.1.1.1  19-Jan-2004  jdolecek Import Gary Thorpe's netbsd-ppbus 1.3. This is NetBSD port
of FreeBSD Parallel Port Bus framework. Work in progress.
 1.4.4.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.4.5  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.4.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.4.3  18-Sep-2004  skrll Sync with HEAD.
 1.4.4.2  03-Aug-2004  skrll Sync with HEAD
 1.4.4.1  01-Feb-2004  skrll file ppbus_conf.c was added on branch ktrace-lwp on 2004-08-03 10:50:27 +0000
 1.6.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.4.1  29-Apr-2005  kent sync with -current
 1.7.4.2  07-Dec-2007  yamt sync with head
 1.7.4.1  21-Jun-2006  yamt sync with head.
 1.9.12.2  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.9.12.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.9.10.1  19-Apr-2006  elad sync with head.
 1.9.8.1  01-Apr-2006  yamt sync with head.
 1.9.6.1  22-Apr-2006  simonb Sync with head.
 1.9.4.1  09-Sep-2006  rpaulo sync with head
 1.11.44.1  08-Dec-2007  ad Sync with head.
 1.11.40.1  08-Dec-2007  mjf Sync with HEAD.
 1.11.34.1  09-Jan-2008  matt sync with HEAD
 1.11.32.1  09-Dec-2007  jmcneill Sync with HEAD.
 1.12.12.1  02-Jun-2008  mjf Sync with HEAD.
 1.15.4.2  11-Mar-2010  yamt sync with head
 1.15.4.1  16-May-2008  yamt sync with head.
 1.15.2.1  18-May-2008  yamt sync with head.
 1.18.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1  31-May-2011  rmind sync with head
 1.19.14.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.4.1  30-Oct-2012  yamt sync with head
 1.20.38.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.10.5  05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.21.10.4  05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.21.10.3  04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.21.10.2  03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.21.10.1  20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.22.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed