regmap_field_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– regmap_field_alloc(9) β€” like, the whole vibe πŸ’–

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” yes that's the manual name, and yes it's giving "I read documentation for fun" energy, which is iconic of you tbh. today we're talking about regmap_field_alloc, and ngl it's one of the girlies who does exactly what her name says. no plot twist. slay.


✨ SYNOPSIS ✨

struct regmap_field * regmap_field_alloc (struct regmap *regmap , struct reg_field reg_field );

that's literally it. two arguments in, one pointer out. main character energy fr fr πŸ”₯


🌸 ARGUMENTS 🌸

  • regmap β€” the regmap bank where this register field is living. think of it as the address of the group chat this register field is in πŸ’…
  • reg_field β€” the register field itself, chillin' there within the bank. that's the one you're pulling out. πŸ¦‹

⭐ DESCRIPTION ⭐

so here's the tea β˜•: whatever you get back is either an ERR_PTR on error πŸ’€, or a totally valid pointer to a struct regmap_field πŸ’–.

heads up bestie: if you get a real pointer, that thing is yours and you gotta free it once you're done working with it β€” use regmap_field_free. don't just ghost it, that's a memory leak and we do NOT do that here πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

okay this list is long but we're not skipping anyone, everyone gets their moment:

Kernel file ./drivers/base/regmap/regmap.c β€” plus: devm_regmap_field_alloc(9), regmap_field_bulk_alloc(9), devm_regmap_field_bulk_alloc(9), regmap_field_bulk_free(9), devm_regmap_field_bulk_free(9), devm_regmap_field_free(9), regmap_field_free(9), regmap_reinit_cache(9), regmap_exit(9), dev_get_regmap(9), regmap_get_device(9), regmap_can_raw_write(9), regmap_get_raw_read_max(9), regmap_get_raw_write_max(9), regmap_write(9), regmap_write_async(9), regmap_raw_write(9), regmap_noinc_write(9), regmap_field_update_bits_base(9), regmap_field_test_bits(9), regmap_fields_update_bits_base(9), regmap_bulk_write(9), regmap_multi_reg_write(9), regmap_multi_reg_write_bypassed(9), regmap_raw_write_async(9), regmap_read(9), regmap_read_bypassed(9), regmap_raw_read(9), regmap_noinc_read(9), regmap_field_read(9), regmap_fields_read(9), regmap_bulk_read(9), regmap_multi_reg_read(9), regmap_update_bits_base(9), regmap_test_bits(9), regmap_async_complete(9), regmap_register_patch(9), regmap_get_val_bytes(9), regmap_get_max_register(9), regmap_get_reg_stride(9), regmap_might_sleep(9)

like I said. everyone. πŸ‘‘βœ¨


🫢 sending you off with the source ./drivers/base/regmap and the October 2026 version stamp β€” this page was literally born in October 2026 and it's serving. bye bestie, go free your fields! πŸ’œπŸ§šβ€β™€οΈ
πŸ“¦ where this page comes from