STRUCT YAS5XX_CHIP_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct yas5xx_chip_info β€” device-specific data and function pointers, bestie πŸ’…

So this is from the Kernel API Manual (yes, the whole manual, not just a vibe), and it's literally the little info card that tells the driver everything it needs to know about each YAS chip. Obsessed.


🌸 SYNOPSIS 🌸

struct yas5xx_chip_info {
    unsigned int devid;
    const char *product_label;
    const char *product_name;
    const char *version_names[2];
    const int *volatile_reg;
    int volatile_reg_qty;
    u32 scaling_val2;
    u16 t_ref;
    s16 min_temp_x10;
    int (*get_measure)(struct yas5xx *yas5xx, s32 *to, s32 *xo, s32 *yo,
s32 *zo);
    int (*get_calibration_data)(struct yas5xx *yas5xx);
    void (*dump_calibration)(struct yas5xx *yas5xx);
    int (*measure_offsets)(struct yas5xx *yas5xx);
    int (*power_on)(struct yas5xx *yas5xx);
 };

πŸŽ€ Members πŸŽ€

Okay so here's the whole cast β€” every single one of them, no skips, periodt:

  • devid β€” the device ID number. Like the chip's little student ID πŸͺͺ
  • product_label β€” the product label used in Linux. It's giving official paperwork ✨
  • product_name β€” the product name of the YAS variant. Which flavour of YAS are we dealing with, iykyk 🌈
  • version_names β€” the version letters or namings. Cute little name tags for each version πŸŽ€
  • volatile_reg β€” device-specific volatile registers. Handle with care, they're spicy πŸ”₯
  • volatile_reg_qty β€” quantity of device-specific volatile registers. Just counting the spicy ones πŸ’€
  • scaling_val2 β€” scaling value for IIO_CHAN_INFO_SCALE. Math but make it fashion πŸ’…
  • t_ref β€” number of counts at reference temperature 20 Β°C. Twenty degrees, iconic 🌑️
  • min_temp_x10 β€” starting point of temperature counting in 1/10:s degrees Celsius. Yes, tenths, don't @ me 🧊
  • get_measure β€” function pointer to get a measurement. Go get that data, bestie 🫢
  • get_calibration_data β€” function pointer to get calibration data. The calibration lore is real πŸ“–
  • dump_calibration β€” function pointer to dump calibration for debugging. Debug girlies rise πŸ™ˆ
  • measure_offsets β€” function pointer to measure the offsets. Offsets getting measured fr fr πŸ“
  • power_on β€” function pointer to power-on procedure. Wake up, chip, we're going to the club ⚑

πŸ’– Description πŸ’–

Okay so real talk β€” the t_ref value for YAS532/533 is known from the Android driver. For YAS530 and YAS537 it was approximately measured. Approximately! So if you're wondering where those numbers came from, now you know πŸ’€

And the temperatures min_temp_x10 are derived from the temperature resolutions given in the data sheets. That's it, that's the tea β˜•

Ngl these numbers aren't just vibes β€” they have sources, but some sources are "the Android driver" and some are "we measured it approximately", and that's just how it is.

πŸ¦‹ SEE ALSO πŸ¦‹


Go read those, bestie, they're all part of the same little magnetometer friend group πŸ§²πŸ’–

Kiss kiss, this page lives at ./drivers/iio/magnetometer, dated October 2026 β€” slay, you found the whole thing, periodt βœ¨πŸŽ€

πŸ“¦ where this page comes from