sdca_regmap_write_defaults(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ sdca_regmap_write_defaults ✨

okay so bestie, you're in the Kernel API Manual, section 9, and today's main character is sdca_regmap_write_defaults β€” a little function that goes and writes out all the DisCo defaults to your device. iconic behavior, honestly. πŸŽ€


🌸 NAME 🌸

sdca_regmap_write_defaults β€” write out DisCo defaults to device

like, it literally does what it says on the tin, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

int sdca_regmap_write_defaults (struct device *dev , struct regmap
*regmap , struct sdca_function_data *function );

three pointers in, one int out. she's lowkey a whole vibe. πŸ’…


πŸ’œ ARGUMENTS πŸ’œ

  • dev β€” Pointer to the device. this is the device, bestie. the whole point. 🫢
  • regmap β€” Pointer to the Function register map. the map of registers, fr fr.
  • function β€” Pointer to the Function information, to be parsed. she's the one getting parsed, and honestly? she's booked and busy.

πŸ”₯ DESCRIPTION πŸ”₯

so this function will write out to the hardware all the DisCo default and fixed value controls. all of them. the defaults, the fixed values, the whole little squad. ✨

the way that this works: writing them out causes them to be populated into the cache, and then all your subsequent handling can just happen through a cache sync. so clean. so efficient. we love a cache sync moment. 🧚

it will also read any non-volatile registers that don't have defaults/fixed values to populate those into the cache too. and why do we care, you ask? because it ensures they are available for reads even when the device is runtime suspended. yes bestie, the reads still gotta read. 😭


⭐ RETURN ⭐

returns zero on success, and a negative error code on failure. so like, zero = slay, negative = πŸ’€. check it, always.


🌈 SEE ALSO 🌈

Kernel file ./sound/soc/sdca/sdca_regmap.c, plus the whole friend group:

go read them, iykyk. πŸ‘‘


ok that's the whole page, go forth and write those defaults πŸ’–

and that's a wrap, babes β€” this one came out of ./sound/soc/sdca, dated October 2026, and it lives in the Kernel API Manual forever and ever. periodt. πŸŒΈπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from