ti_sci_get_device_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ti_sci_get_device_state(9)

Okay so welcome to the Kernel API Manual, bestie β€” this little page is all about ti_sci_get_device_state, which is literally the Get device state helper. It's giving "I just wanna know what state this device is in" energy, and honestly? Same. 🫢


✨ NAME ✨

ti_sci_get_device_state β€” the Get device state helper. That's it, that's the whole vibe. She's a helper function and she knows it. πŸ‘‘


🌸 SYNOPSIS 🌸

int ti_sci_get_device_state (const struct ti_sci_handle *handle , u32 id
, u32 *clcnt , u32 *resets , u8 *p_state , u8 *c_state );

Notice how she returns an int β€” that's your vibe check at the end, iykyk. ✨


πŸŽ€ ARGUMENTS πŸŽ€

Bestie, there are six of these, so buckle up:

  • handle β€” Handle to the device. This is your golden ticket, your main character pointer. Don't lose her. πŸ’…
  • id β€” Device Identifier. A u32 that says which device we're talking about β€” no cap, this matters.
  • clcnt β€” Pointer to Context Loss Count. You pass the address, she fills in the clcnt tea. πŸ“
  • resets β€” pointer to resets. Yeah, lowercase "pointer" in the original, we're keeping it, we don't fix what isn't ours. πŸŽ€
  • p_state β€” pointer to p_state. Short, sweet, mysterious β€” but it's a u8 *, so jot that down. πŸ¦‹
  • c_state β€” pointer to c_state. Also a u8 *. Two little state pointers living their best lives. πŸ’œ
Like, notice that handle and id come in as values but clcnt, resets, p_state and c_state are all pointers β€” so she can write the results back out to you. Iconic behaviour, fr fr. 🌈

πŸ’– RETURN πŸ’–

0 if all went fine, else return appropriate error. That's the whole tea β€” zero means slay, anything else means something went sideways and you should go read what the error is saying. 😭


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/firmware/ti_sci.c β€” and here's the whole friend group, like, every single one, because we don't do "and friends" round here:


That's the whole page, bestie β€” no notes. πŸ’€

And for the cute sign-off: this one lives in the source dir ./drivers/firmware, it's dated October 2026, and it's filed under ti_sci_get_device_state(9) in the Kernel API Manual. Go drink some water, then go read the source. πŸŒΈπŸ’–βœ¨

πŸ“¦ where this page comes from