mtd_pairing_groups(9)
π mtd_pairing_groups(9) π
okay so bestie, welcome to the Kernel API Manual, section 9 β this one's a tiny little function from the MTD (memory technology device) world, and honestly? she's short but she matters. let's get into it β¨
πΈ NAME πΈ
mtd_pairing_groups β get the number of pairing groups π
π¦ SYNOPSIS π¦
int mtd_pairing_groups (struct mtd_info *mtd );
π ARGUMENTS π
mtdβ pointer to new MTD device info structure. that's yourstruct mtd_info *, the whole vibe-check of the device, no cap π«Ά
β¨ DESCRIPTION β¨
So what does she do? she returns the number of pairing groups. that's it, that's the whole job, and she does it flawlessly π
This number is usually equal to the number of bits exposed by a single cell π₯ and here's the fun part β you can use it in conjunction with mtd_pairing_info_to_wunit to iterate over all pages of a given pair. literally the duo we didn't know we needed π
ngl, this is one of those "small function, big main character energy" situations. keep the pairing-group count and mtd_pairing_info_to_wunit together and you can walk every page of a pair, no drama π
π SEE ALSO π
Kernel file ./drivers/mtd/mtdcore.c β and like, the entire extended friend group π :
mtd_wunit_to_pairing_info(9)mtd_pairing_info_to_wunit(9)add_mtd_device(9)del_mtd_device(9)mtd_device_parse_register(9)mtd_device_unregister(9)register_mtd_user(9)unregister_mtd_user(9)get_mtd_device(9)of_get_mtd_device_by_node(9)get_mtd_device_nm(9)mtd_ooblayout_ecc(9)mtd_ooblayout_free(9)mtd_ooblayout_find_region(9)mtd_ooblayout_find_eccregion(9)mtd_ooblayout_get_bytes(9)mtd_ooblayout_set_bytes(9)mtd_ooblayout_count_bytes(9)mtd_ooblayout_get_eccbytes(9)mtd_ooblayout_set_eccbytes(9)mtd_ooblayout_get_databytes(9)mtd_ooblayout_set_databytes(9)mtd_ooblayout_count_freebytes(9)mtd_ooblayout_count_eccbytes(9)mtd_kmalloc_up_to(9)
and that's the whole page, bestie β go read some MTD code, ily, mwah π
signing off from ./drivers/mtd β Kernel API Manual, section 9, dated October 2026 πβ¨π¦
π¦ 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