STRUCT XOADC_VARIANT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct xoadc_variant(9)

okay so this is a page from the Kernel API Manual and bestie, it's literally just about one little struct β€” but she's kind of a big deal πŸŽ€


✨ NAME ✨

struct xoadc_variant β€” encodes the XOADC variant characteristics. that's it, that's the whole job. she's a little info-card for a PMIC variant and honestly? iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

struct xoadc_variant {
    const char name[16];
    const struct xoadc_channel *channels;
    bool broken_ratiometric;
    bool prescaling;
    bool second_level_mux;
 };

πŸ¦‹ Members πŸ¦‹

  • name β€” the name of this PMIC variant. just her name, in a const char array of 16, living her best life πŸ’–
  • channels β€” the hardware channels plus their respective settings and defaults. all of them. this is the whole lineup, the whole squad 🫢
  • broken_ratiometric β€” a bool that's set if the PMIC has broken ratiometric scaling. and ngl, this is a known problem on PM8058 😭 so like… not a vibe, but at least you can check for it.
  • prescaling β€” a bool meaning this variant uses AMUX bits 2 & 3 for prescaling (PM8058). yes, those exact bits. no cap. ✨
  • second_level_mux β€” a bool meaning this variant uses AMUX bits 2 & 3 for a second level mux. bestie it's the same bits, they're just doing double duty depending on the variant β€” lowkey chaotic, highkey fine πŸ’…
fr fr, prescaling and second_level_mux both describe AMUX bits 2 & 3 β€” which one applies depends on the variant, so don't go assuming, okay? πŸ™ˆ

🧚 SEE ALSO 🧚

  • Kernel file ./drivers/iio/adc/qcom-pm8xxx-xoadc.c
  • struct xoadc_channel(9)
  • struct pm8xxx_chan_info(9)
  • struct pm8xxx_xoadc(9)

so yeah, that's the whole struct πŸ“ she lives in ./drivers/iio/adc, the page is dated October 2026, and if you need her you know exactly where to find her πŸ’œ periodt.

πŸ“¦ where this page comes from