STRUCT REGMAP_BUS(9)
π struct regmap_bus(9) β kernel API manual, but make it make sense π
okay so bestie, this page is all about struct regmap_bus β the whole "describe a hardware bus so the register map infrastructure knows what to do with it" situation. yes it's from the kernel API manual. yes it's a lot. we're getting through it together π
β¨ NAME β¨
struct regmap_bus β a description of a hardware bus for the register map infrastructure. literally the little card your bus hands over so regmap knows its vibe π¦
πΈ SYNOPSIS πΈ
struct regmap_bus {
bool fast_io;
bool free_on_exit;
regmap_hw_write write;
regmap_hw_gather_write gather_write;
regmap_hw_async_write async_write;
regmap_hw_reg_write reg_write;
regmap_hw_reg_noinc_write reg_noinc_write;
regmap_hw_reg_update_bits reg_update_bits;
regmap_hw_read read;
regmap_hw_reg_read reg_read;
regmap_hw_reg_noinc_read reg_noinc_read;
regmap_hw_free_context free_context;
regmap_hw_async_alloc async_alloc;
u8 read_flag_mask;
enum regmap_endian reg_format_endian_default;
enum regmap_endian val_format_endian_default;
size_t max_raw_read;
size_t max_raw_write;
};
π Members π
okay this is the main character section, every single field, no skips, no cap π
fast_ioβ register IO is fast. so fast. use a spinlock instead of a mutex to perform locking. β οΈ heads up though: this field is ignored if custom lock/unlock functions are used (peep thelock/unlockfields ofstruct regmap_config). iykyk.free_on_exitβkfreethis on exit of regmap π«Άwriteβ the write operation. that's it, that's the vibe.gather_writeβ write operation with split register/value. returns-ENOTSUPPif it's not implemented on a given device πasync_writeβ write operation which completes asynchronously. optional! and it must serialise with respect to non-async I/O β that part is not optional, bestie.reg_writeβ write a single register value to the given register address. this write operation has to complete when returning from the function. periodt.reg_noinc_writeβ write multiple register values to the same register. also has to complete when returning from the function. no leaving it hanging πreg_update_bitsβ update bits operation, to be used against volatile registers. intended for devices supporting some mechanism for setting clearing bits without having to read/modify/write. iconic behaviour honestly β¨readβ read operation. the data is returned in the buffer used to transmit data. yes, same buffer. that's the whole trick π§reg_readβ read a single register value from a given register address.reg_noinc_readβ read multiple register values from the same register. this read operation has to complete when returning from the function. we said what we said.free_contextβ free context. bye bestie πasync_allocβ allocate aregmap_asyncstructure.read_flag_maskβ mask to be set in the top byte of the register when doing a read. top byte. mask. set it π₯reg_format_endian_defaultβ default endianness for formatted register addresses. used when theregmap_configspecifiesDEFAULT. if this isDEFAULT,BIGis assumed. that's the rule, don't come for me πval_format_endian_defaultβ default endianness for formatted register values. used when theregmap_configspecifiesDEFAULT. if this isDEFAULT,BIGis assumed. same energy, different field πmax_raw_readβ max raw read size that can be used on the bus. the limit, the boundary, the line we do not cross.max_raw_writeβ max raw write size that can be used on the bus. same, but writing π
π SEE ALSO π
it's giving "and here's everyone else in the friend group" β the kernel file ./include/linux/regmap.h, plus:
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)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_i2c(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)
okay that's the whole thing, you ate that π this lil page lives in ./include/linux, dated October 2026, and it's filed under struct regmap_bus(9) β mwah, go read some kernel source, ily, bye πβ¨
π¦ 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