mv88e6xxx_g2...atch_set_bit(9)
π mv88e6xxx_g2_scratch_set_bit(9) β okay so bestie, welcome to the Kernel API Manual β¨
hi hi hiii π«Ά you've landed on mv88e6xxx_g2_scratch_set_bit(9), and ngl this one's a whole little legend. It's a helper in the kernel's DSA corner of the world, and yes, we're gonna get into it. No cap.
πΈ NAME πΈ
mv88e6xxx_g2_scratch_set_bit β set (or clear) a bit π
Like, that's literally it. One bit. Set it, or don't. Iconic minimalism, honestly.
π¦ SYNOPSIS π¦
int mv88e6xxx_g2_scratch_set_bit (struct mv88e6xxx_chip *chip , int
base_reg , unsigned int offset , int set );
There she is. Four args, one int coming back at you. Copy it exactly, don't get creative, she's picky π
π ARGUMENTS π
chipβ the chip private data, aka the whole personality of the chip you're working with π«Άbase_regβ base of scratch bits. That's your starting point, babe.offsetβ index of bit within the register. Which bit are we talking about? This one. Right here.setβ should this bit be set? That's the question. You answer it. Yes or no. Main character decision energy π
β¨ DESCRIPTION β¨
Okay so real talk β this is a helper function for dealing with the direction and data registers. That's the vibe. It's the little utility friend the bigger functions call up when they need a bit flipped, and it does not make a whole production of it. Lowkey the most reliable friend in the group chat π
heads up bestie: it's a helper, so it's out here supporting the direction and data registers β not out here running the whole show.
π₯ SEE ALSO π₯
The whole squad, fr fr β you're gonna want to know all of them π§
- Kernel file
./drivers/net/dsa/mv88e6xxx/global2_scratch.c mv88e6xxx_g2_scratch_get_bit(9)mv88e6352_g2_scratch_gpio_get_data(9)mv88e6352_g2_scratch_gpio_set_data(9)mv88e6352_g2_scratch_gpio_get_dir(9)mv88e6352_g2_scratch_gpio_set_dir(9)mv88e6352_g2_scratch_gpio_get_pctl(9)mv88e6352_g2_scratch_gpio_set_pctl(9)mv88e6390_g2_scratch_gpio_set_smi(9)mv88e6393x_g2_scratch_gpio_set_smi(9)mv88e6352_g2_cache_global_scratch_config3(9)mv88e6352_g2_scratch_port_has_serdes(9)
aaaand that's the page!! π mwah π this cutie lives in ./drivers/net/dsa/mv88e6xxx, dated October 2026, and she's filed under mv88e6xxx_g2...atch_set_bit(9). Slay, go flip some bits responsibly, 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