iosf_mbi_punit_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iosf_mbi_punit_acquire(9) β€” like, the Kernel API Manual era πŸŽ€

okay bestie, buckle up, because this one is a kernel function name so long it's practically a whole personality. It lives in the Kernel API Manual, and yes, we're getting into it.


✨ NAME ✨

iosf_mbi_punit_acquire β€” the function that politely but firmly says "mine now" and acquires access to the P-Unit 🫢


🌸 SYNOPSIS 🌸

void iosf_mbi_punit_acquire (void );

literally that's it. that's the whole call.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • void β€” no arguments. zero. zilch. nothing to pass in, nothing to get wrong. iconic behaviour honestly πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so on some systems, the P-Unit goes and accesses the PMIC to change various voltages β€” and it does that through the same bus that other kernel drivers use for stuff like battery monitoring. shared bus. shared vibes. what could possibly go wrong πŸ’€

and here's the thing, bestie: if a driver sends requests to the P-Unit that require the P-Unit to hit the PMIC bus while another driver is also accessing the PMIC bus, various bad things happen. not like, cute bad. bad bad. 😭

so the move is: call this function before sending requests to the P-Unit that may make it access the PMIC β€” whether that's through iosf_mbi* functions or through other means. no exceptions, no "it'll probably be fine". this function will block all kernel access to the PMIC I2C bus so the P-Unit can safely access the PMIC over that shared I2C bus. it's giving traffic cop. it's giving bouncer at the club. 🚦

now, a note on these systems: the i2c-bus driver will request a semaphore from the P-Unit for exclusive access to the PMIC bus when i2c drivers are accessing it β€” but ngl, that does not appear to be sufficient. we still need to avoid making certain P-Unit requests during the access window to avoid problems. so like, the semaphore is not the whole story, periodt.

⚠️ heads up: this function locks a mutex, which means it may sleep. do not come for it with your atomic-context nonsense, it will not be slayed by that. πŸ™ˆ

🌈 SEE ALSO 🌈


aaaand that's the page, bestie πŸ’œ this lil beauty comes to you from ./arch/x86/include/asm and it's dated October 2026 β€” so yeah, it's from the future, main character energy fr fr βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from