STRUCT TI_SCI_MSG_RESP_GET_DEVICE_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct ti_sci_msg_resp_get_device_state(9) β€” Kernel API Manual πŸ¦‹

okay so bestie, we're in the Kernel API Manual today and this page is literally all about one struct: struct ti_sci_msg_resp_get_device_state. it's giving "reply text from the firmware" energy and tbh it's kind of iconic πŸ’…


✨ NAME ✨

struct ti_sci_msg_resp_get_device_state β€” the response message you get back for a get-device request, no cap 🫢


🌸 SYNOPSIS 🌸

struct ti_sci_msg_resp_get_device_state {
    struct ti_sci_msg_hdr hdr;
    u32 context_loss_count;
    u32 resets;
    u8 programmed_state;
  #define MSG_DEVICE_HW_STATE_OFF         0;
  #define MSG_DEVICE_HW_STATE_ON          1;
  #define MSG_DEVICE_HW_STATE_TRANS       2;
    u8 current_state;
 };

πŸŽ€ Members πŸŽ€

πŸ’– the fields, one by one

  • hdr β€” the generic header. yes bestie, every message gets one, it's the main character of the struct ✨
  • context_loss_count β€” tells you how many times the device has lost context. a driver can use this monotonic counter to figure out whether the device lost context since the last time this message was exchanged πŸ‘‘ (monotonic = it only goes up, it never lies to you)
  • resets β€” the programmed state of the reset lines 🫢
  • programmed_state β€” the state as programmed by set_device. so like, what somebody asked for
    • πŸ’« uses the MSG_DEVICE_SW_* macros
  • current_state β€” the actual state of the hardware. so like, what's actually happening in there 😭 (and yes it can differ from programmed_state, that's the whole vibe check)

πŸ”₯ Description πŸ”₯

literally just: it's the response to the request TI_SCI_MSG_GET_DEVICE_STATE. that's the whole plot πŸ“


🌈 SEE ALSO 🌈

all the siblings, and there are so many, ok slay πŸ’€ β€” from the kernel file ./drivers/firmware/ti_sci.h:

  • struct ti_sci_msg_hdr(9)
  • struct ti_sci_msg_resp_version(9)
  • struct ti_sci_msg_req_reboot(9)
  • struct ti_sci_msg_resp_query_fw_caps(9)
  • struct ti_sci_msg_req_set_device_state(9)
  • struct ti_sci_msg_req_get_device_state(9)
  • struct ti_sci_msg_req_set_device_resets(9)
  • struct ti_sci_msg_req_set_clock_state(9)
  • struct ti_sci_msg_req_get_clock_state(9)
  • struct ti_sci_msg_resp_get_clock_state(9)
  • struct ti_sci_msg_req_set_clock_parent(9)
  • struct ti_sci_msg_req_get_clock_parent(9)
  • struct ti_sci_msg_resp_get_clock_parent(9)
  • struct ti_sci_msg_req_get_clock_num_parents(9)
  • struct ti_sci_msg_resp_get_clock_num_parents(9)
  • struct ti_sci_msg_req_query_clock_freq(9)
  • struct ti_sci_msg_resp_query_clock_freq(9)
  • struct ti_sci_msg_req_set_clock_freq(9)
  • struct ti_sci_msg_req_get_clock_freq(9)
  • struct ti_sci_msg_resp_get_clock_freq(9)
  • struct ti_sci_msg_req_prepare_sleep(9)
  • struct ti_sci_msg_req_set_io_isolation(9)
  • struct ti_sci_msg_resp_lpm_wake_reason(9)
  • struct ti_sci_msg_req_lpm_set_device_constraint(9)
  • struct ti_sci_msg_req_lpm_set_latency_constraint(9)
  • struct ti_sci_msg_req_get_resource_range(9)
  • struct ti_sci_msg_resp_get_resource_range(9)
  • struct ti_sci_msg_req_manage_irq(9)
  • struct ti_sci_msg_rm_ring_cfg_req(9)
  • struct ti_sci_msg_psil_pair(9)
  • struct ti_sci_msg_psil_unpair(9)
  • struct ti_sci_msg_udmap_rx_flow_cfg(9)
  • struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg(9)
  • struct ti_sci_msg_rm_udmap_tx_ch_cfg_req(9)
  • struct ti_sci_msg_rm_udmap_rx_ch_cfg_req(9)
  • struct ti_sci_msg_rm_udmap_flow_cfg_req(9)
  • struct ti_sci_msg_req_proc_request(9)
  • struct ti_sci_msg_req_proc_release(9)
  • struct ti_sci_msg_req_proc_handover(9)
  • struct ti_sci_msg_req_set_config(9)
  • struct ti_sci_msg_req_set_ctrl(9)
  • struct ti_sci_msg_req_get_status(9)
  • struct ti_sci_msg_resp_get_status(9)

go read them all, i'll wait πŸ§šπŸ’œ


πŸ’€ friendly reminder that programmed_state and current_state are two different things and mixing them up is not the move, bestie. also the MSG_DEVICE_HW_STATE_OFF / _ON / _TRANS defines live right in the middle of the struct, which is lowkey chaotic but it's what we have πŸ™ˆ

and that's the page!! sourced from ./drivers/firmware, dated October 2026, and typed out with love by struct ti_s...device_state(9) β€” bye bestie, drink some water πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from