next_valid_state(9)
π next_valid_state(9) π
okay bestie, welcome to the Kernel API Manual entry for next_valid_state(9) β this one's all about finding the next valid C-state, and it's lowkey important so listen up π
πΈ NAME πΈ
next_valid_state β Find next valid C-state β¨
π¦ SYNOPSIS π¦
int next_valid_state (struct cpuidle_device *dev , struct cpuidle_driver
*drv , int index );
π ARGUMENTS π
devβ the cpuidle device πdrvβ the cpuidle driver π«indexβ the index of the currently selected c-state π―
β¨ DESCRIPTION β¨
so here's the tea β: if the state that matches index is valid, then index is returned right back to the caller β no extra drama, no cap.
but if that state isn't valid, this function goes looking for a lower c-state that's still valid (as defined in omap3_power_states[]) and returns that one's index instead. it's giving "we'll find you a backup plan" energy π«Ά
and just so we're clear, a state counts as valid when the 'valid' field is enabled and it satisfies the enable_off_mode condition. both boxes, bestie β
β
π SEE ALSO π
go peek at the kernel file ./arch/arm/mach-omap2/cpuidle34xx.c, plus these iconic functions: omap3_enter_idle(9), omap3_enter_idle_bm(9), and omap3_idle_init(9) π
mwah π this page came from ./arch/arm/mach-omap2, dated October 2026, and it's literally next_valid_state(9) β bye bestie π«Άπ
π¦ 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