STRUCT TI_SCI_DEV_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ti_sci_dev_ops(9) β€” Kernel API Manual πŸ’…

okay so bestie, welcome to the struct ti_sci_dev_ops page. It's giving kernel glue, it's giving device-control main character energy, and we're gonna keep every single detail because that's the whole point. πŸ’–


🌸 NAME 🌸

struct ti_sci_dev_ops β€” Device control operations. That's the vibe. A whole struct of device-control operations, no cap. ✨


✨ SYNOPSIS ✨

here's the struct in all its iconic glory β€” names, types, and signatures kept exactly as written:

struct ti_sci_dev_ops {
    int (*get_device)(const struct ti_sci_handle *handle, u32 id);
    int (*get_device_exclusive)(const struct ti_sci_handle *handle, u32 id);
    int (*idle_device)(const struct ti_sci_handle *handle, u32 id);
    int (*idle_device_exclusive)(const struct ti_sci_handle *handle, u32 id);
    int (*put_device)(const struct ti_sci_handle *handle, u32 id);
    int (*is_valid)(const struct ti_sci_handle *handle, u32 id);
    int (*get_context_loss_count)(const struct ti_sci_handle *handle, u32 id, u32 *count);
    int (*is_idle)(const struct ti_sci_handle *handle, u32 id, bool *requested_state);
    int (*is_stop)(const struct ti_sci_handle *handle, u32 id, bool *req_state, bool *current_state);
    int (*is_on)(const struct ti_sci_handle *handle, u32 id, bool *req_state, bool *current_state);
    int (*is_transitioning)(const struct ti_sci_handle *handle, u32 id, bool *current_state);
    int (*set_device_resets)(const struct ti_sci_handle *handle, u32 id, u32 reset_state);
    int (*get_device_resets)(const struct ti_sci_handle *handle, u32 id, u32 *reset_state);
};

🧚 Members 🧚

bestie, these are the function-pointer members and their little lore. Every return value and error message is kept intact, fr fr. 🫢

  • get_device β€” Command to request for device managed by TISCI. Returns 0 for successful exclusive request, else returns corresponding error message. yes, that's exactly what it says, and we're not fixing it. 😭
  • idle_device β€” Command to idle a device managed by TISCI. Returns 0 for successful exclusive request, else returns corresponding error message.
  • put_device β€” Command to release a device managed by TISCI. Returns 0 for successful release, else returns corresponding error message.
  • is_valid β€” Check if the device ID is a valid ID. Returns 0 if the ID is valid, else returns corresponding error.
  • get_context_loss_count β€” Command to retrieve context loss counter β€” this increments every time the device looses context. Overflow is possible.
    • count: pointer to u32 which will retrieve counter. Returns 0 for successful information request and count has proper data, else returns corresponding error message.
  • is_idle β€” Reports back about device idle state.
    • req_state: Returns requested idle state. Returns 0 for successful information request and req_state and current_state has proper data, else returns corresponding error message.
  • is_stop β€” Reports back about device stop state.
    • req_state: Returns requested stop state.
    • current_state: Returns current stop state. Returns 0 for successful information request and req_state and current_state has proper data, else returns corresponding error message.
  • is_on β€” Reports back about device ON(or active) state.
    • req_state: Returns requested ON state.
    • current_state: Returns current ON state. Returns 0 for successful information request and req_state and current_state has proper data, else returns corresponding error message.
  • is_transitioning β€” Reports back if the device is in the middle of transition of state.
    • -current_state: Returns 'true' if currently transitioning.
  • set_device_resets β€” Command to configure resets for device managed by TISCI.
    • -reset_state: Device specific reset bit field. Returns 0 for successful request, else returns corresponding error message.
  • get_device_resets β€” Command to read state of resets for device managed by TISCI.
    • -reset_state: pointer to u32 which will retrieve resets. Returns 0 for successful request, else returns corresponding error message.

also, just so nobody comes for me: get_device_exclusive and idle_device_exclusive are right there in the struct above. The original Members rundown doesn't give them their own separate blurbs, but they are 100% present and accounted for. πŸ’…


πŸ“ NOTE πŸ“

for all these functions, the following parameters are generic in nature:

  • -handle: Pointer to TISCI handle as retrieved by *ti_sci_get_handle
  • -id: Device Identifier
Request for the device - NOTE: the client MUST maintain integrity of usage count by balancing get_device with put_device. No refcounting is managed by driver for that purpose.

like, this is the important part bestie β€” don't make the kernel sad by unbalancing your counts. 🚨


πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./include/linux/soc/ti/ti_sci_protocol.h β€” go read it, it's right there. Then these iconic structs:

  • struct ti_sci_version_info(9)
  • struct ti_sci_core_ops(9)
  • struct ti_sci_clk_ops(9)
  • struct ti_sci_pm_ops(9)
  • struct ti_sci_resource_desc(9)
  • struct ti_sci_rm_core_ops(9)
  • struct ti_sci_rm_irq_ops(9)
  • struct ti_sci_msg_rm_ring_cfg(9)
  • struct ti_sci_rm_ringacc_ops(9)
  • struct ti_sci_rm_psil_ops(9)
  • struct ti_sci_rm_udmap_ops(9)
  • struct ti_sci_proc_ops(9)
  • struct ti_sci_ops(9)
  • struct ti_sci_handle(9)
  • struct ti_sci_resource(9)

source/version: ./include/linux/soc/ti Β· date: October 2026 Β· page: struct ti_sci_dev_ops(9) β€” okay bye bestie, go forth and balance those usage counts πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from