iosf_mbi_punit_acquire(9)
π 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 π
- Kernel file
./arch/x86/include/asm/iosf_mbi.h iosf_mbi_read(9)iosf_mbi_write(9)iosf_mbi_modify(9)iosf_mbi_punit_release(9)iosf_mbi_block_punit_i2c_access(9)iosf_mbi_register_pmic_bus_access_notifier(9)iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(9)iosf_mbi_assert_punit_acquired(9)
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
- 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