FUNC(9)
β¨ FUNC(9) β the kernel API manual, but make it cute β¨
Okay bestie, buckle up, because we're diving into <pink>FUNC(9)</pink>, straight outta the Kernel API Manual π
πΈ NAME πΈ
FUNC β the macro that initializes an aspeed_g7_soc1_function entry. That's it, that's the whole job, and it does it iconically. π
π¦ SYNOPSIS π¦
FUNC (n , m , ... );
π ARGUMENTS π
nβ the name of the pin function, bestie. Just the name. π·οΈmβ a parenthesized list of mux values, and here's the tea: they map 1:1 onto the groups list. One mux value per group, no skipping, no mixing. βοΈ...β a variable list of pin group names that are associated with this function. As many as you need, queen. π
π DESCRIPTION π
So this macro is out here solving complex static initialization, and honestly? The way it does it is giving main character energy. Here's the breakdown, step by step:
- It creates anonymous arrays for both the group names and the mux values, using C99 Compound Literals. Yes, both. Anonymous. Very mysterious, very slay. π΅οΈββοΈ
- It uses
VM(m)to unwrap those mux values straight into the array initializer. Unwrap, bestie, like a little gift. π - It calculates the number of groups via
sizeofdivision β and this is the important part β that bypasses the__must_be_arraycheck thatARRAY_SIZEperforms. Why do we care? Because that check often fails on compound literals in the kernel environment. So we go around it. Sneaky? Maybe. Necessary? Absolutely. π
π₯ EXAMPLE π₯
FUNC(i2c0, (1, 4), "i2c0", "di2c0")
What this does, fr fr: it maps the "i2c0" group to mux value 1, and it maps the "di2c0" group to mux value 4. Two groups, two mux values, paired up perfectly. Look at them. Obsessed. π«Ά
π SEE ALSO π
- The kernel file
./drivers/pinctrl/aspeed/pinctrl-aspeed-g7-soc1.cβ go read it, iykyk π VM(9)β the unwrapper in question β¨
π Quick vibe check before you go: those mux values in m are matched to the group names positionally, one to one. Don't shuffle them around and then act surprised. π
That's the whole page, bestie! This one came from ./drivers/pinctrl/aspeed, dated October 2026, and it lives at FUNC(9) in the Kernel API Manual. Mwah. πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms