STRUCT ST_LSM6DSX_SETTINGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct st_lsm6dsx_settings β€” the ST IMU sensor settings struct, aka the blueprint bestie πŸ’–

So this page lives in the Kernel API Manual, and it's literally just describing every single field inside this one struct that tells the ST IMU driver how a given sensor wants to be treated. Think of it as the sensor's personality sheet ✨


πŸŽ€ SYNOPSIS πŸŽ€

struct st_lsm6dsx_settings {
    struct st_lsm6dsx_reg reset;
    struct st_lsm6dsx_reg boot;
    struct st_lsm6dsx_reg bdu;
    struct {
      enum st_lsm6dsx_hw_id hw_id;
      const char *name;
      u8 wai;
    } id[ST_LSM6DSX_MAX_ID];
    struct {
      const struct iio_chan_spec *chan;
      int len;
    } channels[2];
    struct {
      struct st_lsm6dsx_reg irq1;
      struct st_lsm6dsx_reg irq2;
      u8 irq1_func;
      u8 irq2_func;
      struct st_lsm6dsx_reg lir;
      struct st_lsm6dsx_reg clear_on_read;
      struct st_lsm6dsx_reg hla;
      struct st_lsm6dsx_reg od;
    } irq_config;
    struct st_lsm6dsx_reg drdy_mask;
    struct st_lsm6dsx_odr_table_entry odr_table[2];
    struct st_lsm6dsx_samples_to_discard samples_to_discard[2];
    struct st_lsm6dsx_fs_table_entry fs_table[2];
    struct st_lsm6dsx_reg decimator[ST_LSM6DSX_ID_MAX];
    struct st_lsm6dsx_reg batch[2];
    struct st_lsm6dsx_fifo_ops fifo_ops;
    struct st_lsm6dsx_hw_ts_settings ts_settings;
    struct st_lsm6dsx_shub_settings shub_settings;
    struct st_lsm6dsx_event_settings event_settings;
    struct st_lsm6dsx_fusion_settings fusion_settings;
 };

Like, look at her. Nested structs inside nested structs. Main character energy fr fr πŸ‘‘


πŸ’… Members πŸ’…

Ok so let's go field by field, no cap, nothing skipped:

  • reset β€” the register address for reset. That's it, that's the whole vibe.
  • boot β€” register address for boot. She wakes up and chooses herself πŸ’…
  • bdu β€” register address for Block Data Update. BDU said what it said.
  • id β€” the whole list of hw id / device name combos that this driver configuration supports. It's an array of ST_LSM6DSX_MAX_ID entries, each carrying an hw_id, a name, and a wai. The roster of who's allowed in the group chat 🫢
  • channels β€” the IIO channels the device supports. Two of them, each with a chan pointer and a len. Periodt.
  • irq_config β€” all the interrupts-related registers. Inside her: irq1, irq2, irq1_func, irq2_func, lir, clear_on_read, hla, and od. Yeah she's got layers.
  • drdy_mask β€” register info for the data-ready mask, which is addr + mask. Two-for-one deal ✨
  • odr_table β€” the hardware sensors odr table (Hz + val). Two entries, because of course.
  • samples_to_discard β€” number of samples to discard for filters settling time. Give the filters a sec to settle, bestie 😭
  • fs_table β€” the hardware sensors gain table (gain + val). Also Γ—2.
  • decimator β€” list of decimator register info (addr + mask), sized ST_LSM6DSX_ID_MAX.
  • batch β€” list of FIFO batching register info (addr + mask). Two of these bad boys.
  • fifo_ops β€” the sensor hw FIFO parameters.
  • ts_settings β€” hw timer related settings ⏱️
  • shub_settings β€” i2c controller related settings.
  • event_settings β€” event settings, sitting right there in the struct.
  • fusion_settings β€” fusion settings. Fusion. Iconic.
Lowkey note: the original page lists event_settings and fusion_settings in the struct but only spells out descriptions for the members above β€” so don't go inventing behaviour for them, iykyk πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

Go read the source, bestie, it's right here:

  • Kernel file ./drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h struct st_lsm6dsx_fifo_ops(9), struct st_lsm6dsx_hw_ts_settings(9), struct st_lsm6dsx_shub_settings(9), struct st_lsm6dsx_ext_dev_settings(9), struct st_lsm6dsx_sensor(9), struct st_lsm6dsx_hw(9)

That's the whole page, bestie β€” no notes, ate and left no crumbs πŸ‘‘ This cutie came out of ./drivers/iio/imu/st_lsm6dsx and she's stamped October 2026 (yes, struct st_lsm6dsx_settings(9), the one and only πŸ’œ). Go forth and configure your IMU πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from