read_dt_param(9)
β¨ read_dt_param(9) β¨
okay bestie, welcome to the read_dt_param page from the Kernel API Manual π β yes it's a kernel manpage, yes it's giving "one tiny helper function that carries the whole device tree on its back", and yes we're gonna get through it together π
πΈ NAME πΈ
read_dt_param β the helper function for reading required parameters from the DT π¦
like, it reads the required ones. the mandatory ones. the "you literally cannot skip this" ones. periodt.
β SYNOPSIS β
bool read_dt_param (struct tegra_dfll *td , const char *param , u32
*dest );
it returns a bool, it takes three args, and yes the line break in the middle of u32 *dest is just how the page prints it β we respect the formatting here, no cap π
π ARGUMENTS π
tdβ the DFLL instance π this is the main character, the thing we're reading parameters forparamβ the DT property name π·οΈ literally just the name of the property you wantdestβ output pointer for the value read β¨ where the number lands once we've grabbed it
π§ DESCRIPTION π§
so here's the vibe: read_dt_param reads a required numeric parameter from the DFLL device node π and if the property doesn't exist? it complains. loudly. it will not silently let that slide, bestie π
and then it returns a boolean indicating success β which is lowkey the best part, because it's designed for easy chaining of multiple calls to this function π₯ so you can go
if (read_dt_param(td, "a", &a) &&
read_dt_param(td, "b", &b) &&
read_dt_param(td, "c", &c))
and it just... flows. iconic behavior honestly π
quick vibe check: it's a required param reader, so a missing property is a real problem, not a "meh, defaults" situation. it will complain. that's the whole point π«Ά
π¦ SEE ALSO π¦
- Kernel file
./drivers/clk/tegra/clk-dfll.cπ (this is where the magic lives, iykyk) enum dfll_ctrl_mode(9)enum dfll_tune_range(9)struct dfll_rate_req(9)dfll_is_running(9)tegra_dfll_runtime_resume(9)tegra_dfll_runtime_suspend(9)dfll_tune_low(9)dfll_scale_dvco_rate(9)dfll_set_mode(9)dfll_i2c_set_output_enabled(9)dfll_pwm_set_output_enabled(9)dfll_set_force_output_value(9)dfll_set_force_output_enabled(9)dfll_force_output(9)dfll_load_i2c_lut(9)dfll_init_i2c_if(9)dfll_init_out_if(9)find_lut_index_for_rate(9)dfll_calculate_rate_request(9)dfll_set_frequency_request(9)dfll_request_rate(9)dfll_disable(9)dfll_enable(9)dfll_set_open_loop_config(9)dfll_lock(9)dfll_unlock(9)dfll_register_clk(9)dfll_unregister_clk(9)dfll_calc_monitored_rate(9)dfll_read_monitor_rate(9)dfll_set_default_params(9)dfll_init_clks(9)dfll_init(9)tegra_dfll_suspend(9)tegra_dfll_resume(9)dfll_build_i2c_lut(9)dfll_fetch_i2c_params(9)dfll_fetch_common_params(9)tegra_dfll_register(9)tegra_dfll_unregister(9)
that's the whole squad π go read them, they're all part of the same ./drivers/clk/tegra friend group π«Ά
and that's the page!! πβ¨ππ¦πΈπ
cute little sign-off: this one comes from the source ./drivers/clk/tegra, dated October 2026, and it's read_dt_param(9) β go forth and read your required params, bestie, you're gonna slay ππ
π¦ 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