devm_regmap_init_i2c(9)
β¨ devm_regmap_init_i2c π
okay so this is a page from the Kernel API Manual β yes bestie, the kernel has its own manual and it's iconic. we're talking devm_regmap_init_i2c(9) today, and it's literally the moment your i2c device gets its very own managed register map π
πΈ NAME
devm_regmap_init_i2c β Initialise managed register map β¨
like, you're setting up a regmap that the kernel will clean up for you, no cap π«Ά
π¦ SYNOPSIS
devm_regmap_init_i2c (i2c , config );
that's it. two args. we love a low-effort queen π
π ARGUMENTS
i2cβ Device that will be interacted with. this is your little i2c buddy, the one you're gonna be chatting with over the bus πconfigβ Configuration for register map. all the vibes and settings your regmap needs to know about itself π
π DESCRIPTION
okay so here's the tea π₯ the return value will be an ERR_PTR on error, or a valid pointer to a struct regmap. so like β vibe check your return before you deref it, fr fr π
and the best part? the regmap will be automatically freed by the device management code. you don't have to clean up after yourself, the kernel does it. main character energy for real. obsessed π
β SEE ALSO
Kernel file ./include/linux/regmap.h β plus this whole extended friend group:
struct reg_default(9)struct reg_sequence(9)regmap_read_poll_timeout(9)regmap_read_poll_timeout_atomic(9)regmap_field_read_poll_timeout(9)struct regmap_range(9)struct regmap_access_table(9)struct regmap_config(9)struct regmap_range_cfg(9)struct regmap_sdw_mbq_cfg(9)struct regmap_bus(9)regmap_init(9)regmap_init_i2c(9)regmap_init_mdio(9)regmap_init_sccb(9)regmap_init_slimbus(9)regmap_init_spi(9)regmap_init_spmi_base(9)regmap_init_spmi_ext(9)regmap_init_w1(9)regmap_init_mmio_clk(9)regmap_init_mmio(9)regmap_init_ac97(9)regmap_init_sdw(9)regmap_init_sdw_mbq(9)regmap_init_sdw_mbq_cfg(9)regmap_init_i3c(9)regmap_init_spi_avmm(9)regmap_init_fsi(9)devm_regmap_init(9)devm_regmap_init_mdio(9)devm_regmap_init_sccb(9)devm_regmap_init_spi(9)devm_regmap_init_spmi_base(9)devm_regmap_init_spmi_ext(9)devm_regmap_init_w1(9)devm_regmap_init_mmio_clk(9)devm_regmap_init_mmio(9)devm_regmap_init_ac97(9)devm_regmap_init_sdw(9)devm_regmap_init_sdw_mbq(9)devm_regmap_init_sdw_mbq_cfg(9)devm_regmap_init_slimbus(9)devm_regmap_init_i3c(9)devm_regmap_init_spi_avmm(9)devm_regmap_init_fsi(9)struct reg_field(9)struct regmap_irq_type(9)struct regmap_irq(9)struct regmap_irq_chip(9)
ngl the whole devm_ family is a whole squad at this point β pick the one that matches your bus and go off π
and that's the whole page bestie, no filler, we ate π this one lives in ./include/linux and it's dated October 2026 β see u in the next devm_regmap_init_i2c(9) moment, mwah ππ§
π¦ 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