rpmh_regula...optimum_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ rpmh_regulator_vrm_get_optimum_mode πŸ’…

okay so bestie, this is a page straight outta the Kernel API Manual πŸ“– β€” yes, that Kernel API Manual, the one with all the driver internals β€” and it's about one very specific little function. her full name is rpmh_regulator_vrm_get_optimum_mode (a mouthful, i know, she ate tho πŸ’…) and in the header it gets shortened to rpmh_regula...optimum_mode(9) because even manpages gotta truncate for the vibes. anyway. let's get into it 🫢


🌸 NAME 🌸

rpmh_regulator_vrm_get_optimum_mode β€” literally just get the mode based on the load ✨ that's her whole job, that's the entire assignment, and she does it flawlessly πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int rpmh_regulator_vrm_get_optimum_mode (struct regulator_dev
*rdev , int input_uV , int output_uV , int load_uA );

so yeah. she takes a struct regulator_dev * and three whole ints, and she hands you back an unsigned int. no cap, that's the signature, copy it exactly, i don't make the rules πŸŽ€


πŸŽ€ ARGUMENTS πŸŽ€

  • rdev β€” the regulator device pointer for the rpmh-regulator πŸ‘‘ like, the actual device we're talking about here. main character energy fr.
  • input_uV β€” input voltage. yes bestie, in microvolts 🌈
  • output_uV β€” output voltage. also volts-ish, also Β΅V-coded πŸ’œ
  • load_uA β€” the aggregated load current, measured in microamps ⚑ note the word aggregated, she's not out here guessing, this is the combined number iykyk

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” this function is used in the regulator_ops for VRM type RPMh regulator devices. that's it. that's the whole description. she's a supporting cast member in the regulator_ops situation and she's thriving 🌟

ngl it's giving "short but essential" and honestly? iconic. no further notes 🧚


πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • a negative error number on failure 😭 (that's your standard kernel "something went wrong" vibe check, so watch for that negative, bestie)

πŸ‘‘ SEE ALSO πŸ‘‘

go check these out, they're all in the same little friend group 🫢:

  • Kernel file ./drivers/regulator/qcom-rpmh-regulator.c πŸ“ (yes, the whole file, go read her)
  • enum rpmh_regulator_type(9)
  • enum regulator_hw_type(9)
  • struct rpmh_vreg_hw_data(9)
  • struct rpmh_vreg(9)
  • struct rpmh_vreg_init_data(9)
  • rpmh_regulator_send_request(9)
  • rpmh_regulator_init_vreg(9)

like, the whole rpmh regulator cinematic universe tbh 🌈⭐


πŸ’€ and remember pookie β€” this is kernel API documentation, so the return value is real and the negative error number will absolutely find you if you ignore it. no cap.

🌸 that's the page!! it lives under ./drivers/regulator (that's the source/version situation 🫢) and it's dated October 2026 β€” so she's a future icon, literally ahead of her time πŸ’…βœ¨ mwah, go ship some regulators bestie πŸŽ€

πŸ“¦ where this page comes from