aspeed_sig_expr_eval(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aspeed_sig_expr_eval β€” Kernel API Manual ✨

okay bestie, welcome to the group chat, because today we're talking about aspeed_sig_expr_eval, and it's genuinely the vibe check your pinmux needed πŸŽ€


🌸 NAME 🌸

aspeed_sig_expr_eval β€” the girl whose whole job is querying whether a mux function's signal on a pin is enabled or disabled πŸ’–


⭐ SYNOPSIS ⭐

int aspeed_sig_expr_eval (struct aspeed_pinmux_data *ctx , const struct
aspeed_sig_expr *expr , bool enabled );

like, look at her. three args, one int return, no drama 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” the driver context for the pinctrl IP. it's giving "here's my whole world, please hold it for a sec" πŸ’œ
  • expr β€” an expression controlling the signal for a mux function on a pin. the actual main character of this function, lowkey πŸ”₯
  • enabled β€” true means "hey bestie, query the enabled state", false means "query the disabled state". she does both, no judgement πŸ’…

πŸ‘‘ RETURN πŸ‘‘

  • 1 if the expression composed by enabled evaluates true πŸŽ‰
  • 0 if not πŸ™ˆ
  • less than zero if an unrecoverable failure occurred πŸ’€ β€” like, she tried, she really did, but it's not coming back from that

✨ DESCRIPTION ✨

okay so listen. a mux function is enabled or disabled if the function's signal expression for each pin in the function's pin group evaluates true for the desired state. every. single. one. no skipping, no "oh that one's fine probably" 🌈

and an signal expression evaluates true if all of its associated signal descriptors evaluate true for the desired state. it's an all-or-nothing situation, fr fr πŸ“

now here's the messy part that you need to know, bestie. if an expression's state is described by more than one bit β€” either through multi-bit bitfields in a single signal descriptor, or through multiple signal descriptors of a single bit β€” then it is possible for the expression to be in neither the enabled nor disabled state. not a bug, just the way the bits fall sometimes, ngl 😭

so we must explicitly test for either condition as required. no vibes-based guessing on this one, periodt πŸ’€

🧚 SEE ALSO 🧚

  • Kernel file ./drivers/pinctrl/aspeed/pinmux-aspeed.c β€” go read her, she's iconic πŸ“–
  • aspeed_sig_desc_eval(9) β€” the sister function, also slay 🌸

and that's the whole page, bestie! 🫢 this little gem lives in ./drivers/pinctrl/aspeed, dated October 2026, and it's all part of the Kernel API Manual. go forth and eval those expressions responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from