BUS_CONFIG_INTR(9)
π BUS_CONFIG_INTR(9) β configure interrupt polarity and trigger mode π
okay so bestie, this one's a kernel section 9 manual page, and it's genuinely so useful β it's all about telling a parent bus "hey, here's how this interrupt wants to be wired up." manual name is BUS_CONFIG_INTR, function alias bus_config_intr. let's get into it π¦
β¨ NAME β¨
BUS_CONFIG_INTR, bus_config_intr β configure interrupt polarity and trigger mode π
πΈ SYNOPSIS πΈ
like, literal copy-paste energy, here's the include situation:
#include <sys/param.h>
#include <sys/bus.h>
int
BUS_CONFIG_INTR(device_t bus, device_t dev, int irq,
enum intr_trigger trig, enum intr_polarity pol);
int
bus_config_intr(device_t dev, int irq, enum intr_trigger trig,
enum intr_polarity pol);
π« DESCRIPTION π«
The BUS_CONFIG_INTR() method is literally the glow-up channel where bus or device drivers get to hand their interrupt polarity and trigger mode up to the parent buses. π«Ά
And the way this works? It typically bubbles all the way up to the root bus (like nexus, iykyk) where the actual necessary actions get taken to actually program the hardware. main character bus fr fr π
ngl, since the BUS_CONFIG_INTR() method takes an interrupt number, it's assumed β but not necessarily required, no cap β that it gets called prior to BUS_SETUP_INTR(9). π«‘
The bus_config_intr() function is a simple little wrapper around BUS_CONFIG_INTR() β lowkey just a convenience bestie. π
β the trig argument β
so the trig argument can be one of these three, and they're all about when the interrupt fires:
INTR_TRIGGER_CONFORMβ the interrupt trigger mode is standard for the bus to which the device is attached. (basically "do whatever's normal here" π)INTR_TRIGGER_EDGEβ the interrupt is edge triggered. This means the interrupt is raised by the rising edge of the signal on the interrupt line. The signal typically reverts to the original state so as to cause a spike. β‘ (imagine a little blip, a spike, a moment β that's the whole vibe)INTR_TRIGGER_LEVELβ the interrupt is level triggered. This means the interrupt is raised when the signal on the interrupt line transitions and remains unchanged after that until the interrupt has been serviced, after which the signal transitions back. π₯ (it's giving "holding the door open until someone lets you through")
π¦ the pol argument π¦
and the pol argument can be any one of these three β this one's about what voltage activates it:
INTR_POLARITY_CONFORMβ the interrupt polarity is standard for the bus to which the device is attached. (again with the "just do the normal thing" energy β¨)INTR_POLARITY_HIGHβ the interrupt is activated by a high voltage on the interrupt line. πΌINTR_POLARITY_LOWβ the interrupt is activated by a low voltage on the interrupt line. π½
π RETURN VALUES π
Zero is returned on success β slay β otherwise an appropriate error is returned. π that's it, that's the whole vibe check.
π§ SEE ALSO π§
go read those too bestie, they're the rest of the saga ππ
π HISTORY π
The BUS_CONFIG_INTR() method first appeared in FreeBSD 5.2. iconic behavior honestly, she's been around π
π AUTHORS π
This manual page was written by Marcel Moolenaar <marcel@xcllnt.net>. ty legend π«Ά
ok that's the whole page!! every flag, every value, every path β nothing skipped, no cap π β¨
alright bestie, that's a wrap β this page is from the Debian crew, dated January 16, 2025, and it's the BUS_CONFIG_INTR(9) kernel developer's manual page. love that for us πππ¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Marcel Moolenaar
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms