I've tweaked the opl3sa2 driver to use PnP BIOS device detection/registration,
in order to load "automagically" the module without specifying the io/dma/irq
stuff on my system that do not support ISA PnP.
So, for compatibility, I end up using both ISA and BIOS PnP functions. I've got
to handle all the configuration cases (CONFIG_ISAPNP/CONFIG_BIOSPNP). I first
try with ISA, if it fails then I try with BIOS, then I've got to remind what
method (ISA or BIOS) was used in order to correctly unload/remove the driver
by calling the correct isapnp_ or pnpbios_ functions. And I had to duplicate
all the isapnp functions/struct to pnpbios equivalent.
So I'd like to know what do you think about making a generic PnP layer that
would "hide" and automatically select to use ISA or BIOS functions ?
The driver code would use the "generic PnP" functions without checking all
the configuration cases. And the "generic PnP" layer would decide if it
uses ISA or BIOS and make/forward the correct calls.
This way, we could write drivers that would work indifferently with ISA PnP
or BIOS PnP. If the system support ISA PnP, then the "generic" PnP
layer would use ISA functions, and if the system support only BIOS PnP then
it would use BIOS functions.
Is the "new driver model" from P. Mochel supposed to do this ? or is it just
for PCI devices ?
--- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/