STRUCT ST_LSM6DSX_SETTINGS(9)
πΈ 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 ofST_LSM6DSX_MAX_IDentries, each carrying anhw_id, aname, and awai. The roster of who's allowed in the group chat π«Άchannelsβ the IIO channels the device supports. Two of them, each with achanpointer and alen. Periodt.irq_configβ all the interrupts-related registers. Inside her:irq1,irq2,irq1_func,irq2_func,lir,clear_on_read,hla, andod. 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), sizedST_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 listsevent_settingsandfusion_settingsin 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.hstructst_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
- 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