libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’œ libnvme(9) β€” API Manual πŸ’œ

okay bestie, welcome to another episode of "the kernel said what now" β€” this one's from the libnvme(9) API manual, and it's all about one little enum. yes, just an enum. and honestly? it's giving ✨organized✨. let's go.


πŸŽ€ NAME πŸŽ€

enum nvme_voltage_measurement_vsi β€” the Voltage Measurement log page's Voltage Sensor Info (VSI). that's the whole vibe. no cap, it's literally just a bundle of constants for poking at voltage sensor fields. πŸ’…


✨ SYNOPSIS ✨

here's the shape of it, bestie β€” copy it exactly, don't freestyle:

enum nvme_voltage_measurement_vsi {
    NVME_VOLTAGE_MEASUREMENT_VSI_VSSV_SHIFT ,
    NVME_VOLTAGE_MEASUREMENT_VSI_VSSV_MASK ,
    NVME_VOLTAGE_MEASUREMENT_VSI_VSSL_SHIFT ,
    NVME_VOLTAGE_MEASUREMENT_VSI_VSSL_MASK ,
    NVME_VOLTAGE_MEASUREMENT_VSI_VSSS_SHIFT ,
    NVME_VOLTAGE_MEASUREMENT_VSI_VSSS_MASK

};

six members. that's it. that's the whole enum. she's small but she's doing her job 🫢


🌸 Constants 🌸

okay so literally every member is a constant, and each one is either a shift or a mask. shift = move the bits over, mask = grab just those bits. classic bit-twiddling duo, they ate πŸ”₯

  • NVME_VOLTAGE_MEASUREMENT_VSI_VSSV_SHIFT β€” the shift amount you use to get the Voltage Sensor Supply Value (VSSV), and heads up, it's in units of 0.05 V. so don't go reading it like it's plain volts, bestie 😭
  • NVME_VOLTAGE_MEASUREMENT_VSI_VSSV_MASK β€” the mask to get VSSV, that's it, that's her whole personality
  • NVME_VOLTAGE_MEASUREMENT_VSI_VSSL_SHIFT β€” the shift amount to get the Voltage Sensor Supply Label (VSSL) πŸ‘‘
  • NVME_VOLTAGE_MEASUREMENT_VSI_VSSL_MASK β€” the mask to get VSSL
  • NVME_VOLTAGE_MEASUREMENT_VSI_VSSS_SHIFT β€” the shift amount to get the Voltage Sensor Sample Scale (VSSS) ⭐
  • NVME_VOLTAGE_MEASUREMENT_VSI_VSSS_MASK β€” the mask to get VSSS
fr fr: shift first, then mask β€” that's the pattern across all three pairs. VSSV, VSSL, VSSS. say it with me. main character energy 🌈

and that's the page, bestie πŸ’– this was libnvme(9), part of the API Manual, dated October 2026 β€” mwah, go read some registers, ily, bye πŸ§šπŸ’œ

πŸ“¦ where this page comes from