regmap_test_bits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to regmap_test_bits(9) from the Kernel API Manual ✨ this one is literally here to check if all specified bits are set in a register. periodt πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

int regmap_test_bits (struct regmap *map , unsigned int reg , unsigned
       int bits );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • map β€” the register map we're operating on, the main character of this whole situation πŸ’«
  • reg β€” the register to read from, aka the spot we're checking
  • bits β€” the bits to test, the little squad we're looking for πŸ‘‘

🌸 DESCRIPTION 🌸

So here's the vibe check, bestie: this returns 0 if at least one of the tested bits is not set. It returns 1 if all tested bits are set. And if the underlying regmap_read fails, it returns a negative error number 😭 no cap.

That's the whole story. Short, sweet, and absolutely iconic ✨

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/base/regmap/regmap.c


Cute little sign-off: source/version is ./drivers/base/regmap, the date is October 2026, and this whole page is regmap_test_bits(9) πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from