aspeed_sig_desc_eval(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aspeed_sig_desc_eval(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so this is a page from the Kernel API Manual and it's literally about checking whether a signal descriptor is on or off. yes bestie, we're in the pinctrl trenches today πŸ¦‹


✨ NAME ✨

aspeed_sig_desc_eval β€” query the enabled or disabled state of a signal descriptor πŸ’«


🌸 SYNOPSIS 🌸

int aspeed_sig_desc_eval (const struct aspeed_sig_desc *desc , bool
       enabled , struct regmap *map );

so iconic. so small. so much power 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • desc β€” the signal descriptor of interest, aka the main character of this whole operation πŸ‘‘
  • enabled β€” pass true to query the enabled state, false to query the disabled state. it's giving "two vibes, one flag" πŸ’…
  • map β€” the IP block's regmap instance. that's the plug, the connection, the whole infrastructure ngl 🌈

⭐ RETURN ⭐

ok so here's the vibe check on the return value:

  • 1 if the descriptor's bitfield is configured to the state selected by enabled βœ…
  • 0 if not πŸ™ˆ
  • less than zero if an unrecoverable failure occurred πŸ˜­πŸ’€

periodt. that's the whole range.


πŸ”₯ DESCRIPTION πŸ”₯

so like, evaluating descriptor state is non-trivial, and here's why: it's not a binary outcome. not me finding out it's not just on/off 😭

the bitfields can be greater than one bit in size, which means they can take a value that is neither the enabled nor the disabled state recorded in the descriptor. typically, this means a different function than the one of interest is enabled β€” so like, something is on, just not the thing you asked about 🧚

because of that, we must explicitly test for either condition as required. no assumptions, no shortcuts, we check both states properly. lowkey obsessed with how thorough that is πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the page!! go forth and evaluate your signal descriptors, bestie πŸ’œ

this masterpiece of a manual page comes to you from ./drivers/pinctrl/aspeed, dated October 2026 β€” drink water, read your kernel source, and slay πŸ’…βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from