cy8c95x0_regmap_read_bits(9)
π cy8c95x0_regmap_read_bits(9) β like, the Kernel API Manual, bestie β¨
okay so picture this: you're deep in the kernel, in pinctrl land, and you need to read a register. but not just any register β one that lives behind a mux. and there's caching. and state. and honestly it's a whole thing. this function is the friend who handles all of that for you so you don't have to π«Ά
no cap, it's the kernel API manual page for cy8c95x0_regmap_read_bits, and it's lowkey iconic.
β¨ NAME β¨
cy8c95x0_regmap_read_bits β reads a register using the regmap cache π
π SYNOPSIS π
int cy8c95x0_regmap_read_bits (struct cy8c95x0_pinctrl *chip , unsigned
int reg , unsigned int port , unsigned int mask , unsigned int *val );
πΈ ARGUMENTS πΈ
chipβ the pinctrl you're working on, bestie. that's the main character right there πregβ the register you wanna read from. it can be a direct access register or a muxed register, so likeβ¦ both vibes are valid β¨portβ the port used for muxed registers, or for quick path direct access registers. otherwise it's justβ¦ unused. sitting there. doing nothing πmaskβ the bitmask to apply π―valβ the value that gets read from hardware or from the cache. this is where the good stuff lands π
π¦ DESCRIPTION π¦
so what does it actually do? it handles register reads from both the direct access registers and the muxed registers, while caching all register accesses. internally it takes care of keeping the PORTSEL register in the correct state, and it protects the access to muxed registers. the way that it justβ¦ handles it π
β οΈ okay this part is important, fr fr: the caller must only use this function to read registers behind the PORTSEL mux. that's not a suggestion, that's the rule π
π RETURN π
0 for a successful request β slay. otherwise you get a corresponding error value, and, well, vibe check failed π
β SEE ALSO β
- Kernel file
./drivers/pinctrl/pinctrl-cy8c95x0.cstructcy8c95x0_pinctrl(9)π₯ cy8c95x0_regmap_write_bits(9)cy8c95x0_regmap_update_bits(9)
go read those too, iykyk π
and that's the page, bestie π this little gem lives under ./drivers/pinctrl, dated October 2026, in the Kernel API Manual β mwah, no notes, periodt π
β¨
π¦ 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