STRUCT ST_LSM6DSX_HW(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so this is struct st_lsm6dsx_hw(9) from the Kernel API Manual, and it's literally the ST IMU MEMS hw instance β€” main character energy for the ST IMU MEMS hardware, no cap. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

here's the exact struct bestie, copy-paste vibes only:

       struct st_lsm6dsx_hw {
           struct device *dev;
           struct regmap *regmap;
           int irq;
           struct mutex fifo_lock;
           struct mutex conf_lock;
           struct mutex page_lock;
           u8 suspend_mask;
           u8 enable_mask;
           u8 fifo_mask;
           s64 ts_gain;
           u8 ts_sip;
           u8 sip;
           u8 irq_routing;
           u8 enable_event[ST_LSM6DSX_EVENT_MAX];
           u8 *buff;
           struct iio_dev *iio_devs[ST_LSM6DSX_ID_MAX];
           const struct st_lsm6dsx_settings *settings;
           struct iio_mount_matrix orientation;
           struct {
             __le16 channels[3];
             aligned_s64 ts;
           } scan[ST_LSM6DSX_ID_MAX];
        };

πŸŽ€ Members πŸŽ€

  • dev β€” pointer to the instance of struct device (I2C or SPI), aka the device itself. 🫢
  • regmap β€” register map of the device, periodt.
  • irq β€” device interrupt line (I2C or SPI) β€” that's the interrupt vibe. ⚑
  • fifo_lock β€” mutex to prevent concurrent access to the hw FIFO, fr fr.
  • conf_lock β€” mutex to prevent concurrent FIFO configuration update β€” no fighting over updates, bestie. πŸ’…
  • page_lock β€” mutex to prevent concurrent memory page configuration.
  • suspend_mask β€” suspended sensor bitmask, simple as that.
  • enable_mask β€” enabled sensor bitmask. ✨
  • fifo_mask β€” enabled hw FIFO bitmask.
  • ts_gain β€” hw timestamp rate after internal calibration β€” the calibration already ate. πŸ”₯
  • ts_sip β€” total number of timestamp samples in a given pattern.
  • sip β€” total number of samples (acc/gyro/ts) in a given pattern.
  • irq_routing β€” pointer to interrupt routing configuration. πŸ‘€
  • enable_event β€” enabled event bitmask.
  • buff β€” device read buffer.
  • iio_devs β€” pointers to acc/gyro iio_dev instances. πŸ¦‹
  • settings β€” pointer to the specific sensor settings in use β€” which settings? the ones in use, iykyk.
  • orientation β€” sensor chip orientation relative to main hardware.
  • scan β€” temporary buffers used to align data before iio_push_to_buffers. 🌸

🌈 SEE ALSO 🌈

  • 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_settings(9)
  • struct st_lsm6dsx_sensor(9)

and that's the whole vibe check, bestie πŸ’… β€” this page comes from ./drivers/iio/imu/st_lsm6dsx, October 2026. go off, royalty πŸŒˆπŸ‘‘βœ¨

πŸ“¦ where this page comes from