diff options
author | marcel <marcel@FreeBSD.org> | 2003-09-10 21:37:10 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-09-10 21:37:10 +0000 |
commit | 5b7162679021b8172dbaed25aa7e46235bc50eb3 (patch) | |
tree | e352891e6c79c2e16bc27caa439f4d033d2c1b9a /sys/kern/subr_bus.c | |
parent | 166a76868af23b3c216ac5e84e7f7fbba056cd41 (diff) | |
download | FreeBSD-src-5b7162679021b8172dbaed25aa7e46235bc50eb3.zip FreeBSD-src-5b7162679021b8172dbaed25aa7e46235bc50eb3.tar.gz |
Introduce BUS_CONFIG_INTR(). The method allows devices to tell parents
about interrupt trigger mode and interrupt polarity. This allows ACPI
for example to pass interrupt resource information up the hierarchy.
The default implementation of the method therefore is to pass the
request to the parent.
Reviewed by: jhb, njl
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r-- | sys/kern/subr_bus.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index e5f9a98..7bb7704 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1926,6 +1926,17 @@ bus_generic_deactivate_resource(device_t dev, device_t child, int type, } int +bus_generic_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + + /* Propagate up the bus hierarchy until someone handles it. */ + if (dev->parent) + return (BUS_CONFIG_INTR(dev->parent, irq, trig, pol)); + return (EINVAL); +} + +int bus_generic_rl_get_resource (device_t dev, device_t child, int type, int rid, u_long *startp, u_long *countp) { |