tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Inter-driver #if dependencies



On Mon, 18 May 2015, David Holland wrote:

The idea of attacing driver A to bus B is that B provides a set of
function pointers for A to call to do bus operations... and A also
provides a set of function pointers for B to call as callbacks, like
interrupt handlers.

If you need more such functions, extend the interface between the A
and B you're dealing with; don't wedge stuff into the generic device
scheme as a shortcut to avoid redesigning that interface.

Unfortunately, the devices in question are not in a direct line of descent.

	pcppi at isa
	attimer at acpi
	pckbd at pckbc at isa

The attimer is in fact an isa device, but it is configured and accessed via acpi. (acpi gets to "claim" the device before isa bus enumeration occurs.)

Furthermore, the dependencies (as currently implemented) are based on the presence of the driver (#if NPCKBD > 0) without regard to whether the driver has been instantiated.

As I indicated in an earlier post on this thread, it's not yet clear to me how the sysbeep(4) device gets hooked-in with non-pckbc-attached keyboards. I'm still searching for this...

Based on the feedback I've received, I am abandoning my suggestion. I will continue to attempt to define a solution that conforms to the current configuration model.


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index