STRUCT TCS_GROUP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct tcs_group(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– you're literally about to meet struct tcs_group β€” a whole squad of Trigger Command Sets (TCS) that exist for one reason: to send state requests to the controller. group chat energy, but make it hardware πŸŽ€


🌸 NAME 🌸

struct tcs_group β€” a group of Trigger Command Sets (TCS) that you send state requests to the controller with 🫢


✨ SYNOPSIS ✨

struct tcs_group {
    struct rsc_drv *drv;
    int type;
    u32 mask;
    u32 offset;
    int num_tcs;
    int ncpt;
    const struct tcs_request *req[MAX_TCS_PER_TYPE];
    unsigned long slots[BITS_TO_LONGS( MAX_TCS_SLOTS)];
};

πŸ¦‹ Members πŸ¦‹

like, every single field, no skipping, iykyk πŸ’…

  • drv β€” The controller. the main character, honestly πŸ‘‘
  • type β€” type of the TCS in this group β€” active, sleep, or wake. pick your vibe ✨
  • mask β€” mask of the TCSes relative to all the TCSes in the RSC.
  • offset β€” start of the TCS group relative to the TCSes in the RSC.
  • num_tcs β€” how many TCSes live in this type. the headcount πŸ“
  • ncpt β€” number of commands in each TCS.
  • req β€” the requests that get sent from the TCS; only used for ACTIVE_ONLY transfers (tho it could be on a wake/sleep TCS if we are borrowing it for an ACTIVE_ONLY transfer πŸ‘€). The whole choreography is:
    • Start: grab drv->lock, set req, set tcs_in_use, drop drv->lock, trigger
    • End: get irq, access req, grab drv->lock, clear tcs_in_use, drop drv->lock

literally a whole routine, respect the lock discipline fr fr πŸ”₯

  • slots β€” indicates which of cmd_addr are occupied; only used for SLEEP / WAKE TCSs. things are tightly packed in the case that (ncpt < MAX_CMDS_PER_TCS). like, if ncpt = 2 and MAX_CMDS_PER_TCS = 16 then bit[2] = the first bit in the 2nd TCS. no wasted space, we love a compact queen πŸ’…
ngl the req and slots fields both have conditions on when they're used, so pls don't just assume they're always live β€” read the vibes (and the field) first πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/soc/qcom/rpmh-internal.h, plus the besties: struct rpmh_request(9), struct rpmh_ctrlr(9), struct rsc_drv(9) 🌈


and that's the whole page, bestie 🧚 this one came from ./drivers/soc/qcom and it's dated October 2026, filed under struct tcs_group(9) β€” go forth and slay your state requests πŸ’–πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from