STRUCT TI_SCI_CLK_OPS(9)
โจ struct ti_sci_clk_ops(9) โจ
okay so bestie, welcome to the Kernel API Manual ๐
this is the whole entire vibe of struct ti_sci_clk_ops โ the clock control operations struct. it's giving "let me manage your clocks for you" energy, and honestly? iconic.
๐ธ NAME ๐ธ
struct ti_sci_clk_ops โ Clock control operations ๐โจ
๐ฆ SYNOPSIS ๐ฆ
bestie. look at this struct. it's a whole menu of function pointers and it is lowkey a lot, but we're gonna get through it together ๐ซถ
struct ti_sci_clk_ops {
int (*get_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid, bool needs_ssc, bool can_change_freq, bool enable_input_term);
int (*idle_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid);
int (*put_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid);
int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u32 cid, bool *req_state);
int (*is_on)(const struct ti_sci_handle *handle, u32 did, u32 cid, bool *req_state, bool *current_state);
int (*is_off)(const struct ti_sci_handle *handle, u32 did, u32 cid, bool *req_state, bool *current_state);
int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid, u32 parent_id);
int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid, u32 *parent_id);
int (*get_num_parents)(const struct ti_sci_handle *handle, u32 did, u32 cid, u32 *num_parents);
int (*get_best_match_freq)(const struct ti_sci_handle *handle, u32 did, u32 cid, u64 min_freq, u64 target_freq, u64 max_freq, u64 *match_freq);
int (*set_freq)(const struct ti_sci_handle *handle, u32 did, u32 cid, u64 min_freq, u64 target_freq, u64 max_freq);
int (*get_freq)(const struct ti_sci_handle *handle, u32 did, u32 cid, u64 *current_freq);
};
๐ MEMBERS ๐
๐ get_clock
Request for activation of clock and manage by processor โ literally the "hey bestie, wake up" call for your clock.
needs_ssc:'true'if Spread Spectrum clock is desired.can_change_freq:'true'if frequency change is desired.enable_input_term:'true'if input termination is desired.
๐ด idle_clock
Request for Idling a clock managed by processor. nap time fr fr.
๐ซณ put_clock
Release the clock to be auto managed by TISCI โ letting go and letting the firmware take the wheel โจ
๐ค is_auto
Is the clock being auto managed โ vibe check on who's actually in charge here.
req_state: state indicating if the clock is auto managed.
๐ข is_on
Is the clock ON โ the moment of truth.
req_state: if the clock is requested to be forced ON.current_state: if the clock is currently ON.
๐ด is_off
Is the clock OFF โ the opposite moment of truth.
req_state: if the clock is requested to be forced OFF.current_state: if the clock is currently Gated.
๐ set_parent
Set the clock source of a specific device clock โ choosing your clock's main character ancestor.
parent_id: Parent clock identifier to set.
๐ get_parent
Get the current clock source of a specific device clock โ finding out who your clock's parent actually is.
parent_id: Parent clock identifier which is the parent.
๐งฎ get_num_parents
Get the number of parents of the current clock source โ counting the whole family tree.
num_parents: returns the number of parent clocks.
๐ฏ get_best_match_freq
Find a best matching frequency for a frequency range. matchmaking, but for clock speeds ๐
match_freq: Best matching frequency in Hz.
โก set_freq
Set the Clock frequency.
๐ get_freq
Get the Clock frequency.
current_freq: Frequency in Hz that the clock is at.
๐ NOTE ๐
okay so for ALL of these functions, the following parameters are generic in nature โ they show up everywhere, so memorize the squad ๐ซถ
-handleโ Pointer to TISCI handle as retrieved by*ti_sci_get_handle-didโ Device identifier this request is for-cidโ Clock identifier for the device for this request. Each device has it's own set of clock inputs. This indexes which clock input to modify.-min_freqโ The minimum allowable frequency in Hz. This is the minimum allowable programmed frequency and does not account for clock tolerances and jitter.-target_freqโ The target clock frequency in Hz. A frequency will be processed as close to this target frequency as possible.-max_freqโ The maximum allowable frequency in Hz. This is the maximum allowable programmed frequency and does not account for clock tolerances and jitter.
Request for the clock โ NOTE: the client MUST maintain integrity of usage count by balancingget_clockwithput_clock. No refcounting is managed by driver for that purpose. not me stressing this but fr fr, balance them or you WILL have a bad time ๐ญ
๐ SEE ALSO ๐
Kernel file ./include/linux/soc/ti/ti_sci_protocol.h โ go read it, iykyk ๐ง
struct ti_sci_version_info(9)struct ti_sci_core_ops(9)struct ti_sci_dev_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)
๐ that's the whole page bestie ๐ brought to you from ./include/linux/soc/ti, dated October 2026, and yes the page is literally titled struct ti_sci_clk_ops(9) because we keep it consistent ๐ slay, go manage some clocks, periodt โจ๐๐ฆ
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms