STRUCT ST_LSM6DSX_HW(9)
β¨ 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 ofstruct 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/gyroiio_devinstances. π¦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 beforeiio_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms