mma9551_set_power_state(9)
π mma9551_set_power_state β a kernel API manual moment
okay so bestie, we're literally in the Kernel API Manual today and the main character is mma9551_set_power_state. yes it's a function. yes it's about power. yes we're gonna get into it. π«Ά
β¨ NAME β¨
mma9551_set_power_state β sets runtime PM state
like, it sets the runtime PM state. that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
int mma9551_set_power_state (struct i2c_client *client , bool on );
that return type is int btw, and it takes two things: an I2C client and a boolean. we love a two-argument icon.
π ARGUMENTS π
clientβ the I2C client. that's the device we're talking to, she's the main character here πonβ passtrueto power the device on, passfalseto power it off. literally just on/off bestie, you got this β
π¦ DESCRIPTION π¦
Resume or suspend the device using Runtime PM. the way it just... resumes or suspends. iconic behaviour honestly.
and here's the little detail everyone forgets: the device will suspend after the autosuspend delay. so like, it doesn't yeet itself into suspend instantly, it waits out the delay first. don't @ me, that's just what the manpage says π
π₯ RETURN π₯
0on success π- a negative value on failure π
that's it. zero is the good one. negative means something went sideways. vibe check accordingly.
π SEE ALSO π
the kernel file lives right here, go peek:
- Kernel file
./drivers/iio/accel/mma9551_core.c
and the whole friend group, all of these:
mma9551_read_config_byte(9)mma9551_write_config_byte(9)mma9551_read_status_byte(9)mma9551_read_config_word(9)mma9551_write_config_word(9)mma9551_read_status_word(9)mma9551_read_config_words(9)mma9551_read_status_words(9)mma9551_write_config_words(9)mma9551_update_config_bits(9)mma9551_gpio_config(9)mma9551_read_version(9)mma9551_set_device_state(9)mma9551_sleep(9)mma9551_read_accel_chan(9)mma9551_read_accel_scale(9)mma9551_app_reset(9)
seriously, read them all, they're all slay π
kudos to ./drivers/iio/accel for being the source β dated October 2026, no cap πβ¨
that's the page bestie, go forth and manage your runtime power state responsibly π πΈ
π¦ 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