STRUCT ST_SENSOR_SETTINGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct st_sensor_settings(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so. this is a page straight out of the Kernel API Manual, section 9, and it's all about struct st_sensor_settings β€” which is, like, literally the ST-specific sensor settings struct. it's the main character of every ST sensor driver's config, no cap. πŸ¦‹


✨ NAME ✨

struct st_sensor_settings β€” ST specific sensor settings. that's it, that's the vibe. it's giving "one struct to hold every knob your ST sensor has." πŸ’…


🌸 SYNOPSIS 🌸

here's the whole thing, character for character, because we do NOT paraphrase code in this house:

struct st_sensor_settings {
    u8 wai;
    u8 wai_addr;
    char sensors_supported[ST_SENSORS_MAX_4WAI][ST_SENSORS_MAX_NAME];
    struct iio_chan_spec *ch;
    int num_ch;
    struct st_sensor_odr odr;
    struct st_sensor_power pw;
    struct st_sensor_axis enable_axis;
    struct st_sensor_fullscale fs;
    struct st_sensor_bdu bdu;
    struct st_sensor_das das;
    struct st_sensor_data_ready_irq drdy_irq;
    struct st_sensor_sim sim;
    bool multi_read_bit;
    unsigned int bootime;
 };

like… look at her. so organized. so structured (literally). πŸ”₯


πŸ‘‘ Members πŸ‘‘

let's go through every single one, bestie, because every field matters:

  • wai β€” contents of the WhoAmI register. yes it's really called that. yes it's as iconic as it sounds. πŸ‘‘
  • wai_addr β€” the address of the WhoAmI register. gotta know where the identity crisis lives. πŸ“
  • sensors_supported β€” list of supported sensors by struct itself. it's a char array of size [ST_SENSORS_MAX_4WAI][ST_SENSORS_MAX_NAME], so it's holding a whole roster of besties. 🫢
  • ch β€” IIO channels for the sensor. this one's a struct iio_chan_spec *. 🌈
  • num_ch β€” number of IIO channels in ch. it's an int, and it's literally counting your channels for you. ⭐
  • odr β€” output data rate register and ODR list available. struct st_sensor_odr. fast, slow, she does it all. πŸ”₯
  • pw β€” power register of the sensor. struct st_sensor_power. self-care = power management, periodt. πŸ’œ
  • enable_axis β€” enable one or more axis of the sensor. that's struct st_sensor_axis, and yes you can turn on multiple axes, she's flexible like that. πŸŽ€
  • fs β€” full scale register and full scale list available. struct st_sensor_fullscale. go big or go home. ✨
  • bdu β€” block data update register. struct st_sensor_bdu. tiny name, important job. πŸ“
  • das β€” Data Alignment Selection register. struct st_sensor_das. capital letters because she's fancy. πŸ’…
  • drdy_irq β€” data ready register of the sensor. struct st_sensor_data_ready_irq β€” she's ready when you are. πŸ’–
  • sim β€” SPI serial interface mode register of the sensor. struct st_sensor_sim. 🧚
  • multi_read_bit β€” use or not particular bit for [I2C/SPI] multi-read. it's a bool, so it's a yes/no vibe check. πŸ¦‹
  • bootime β€” samples to discard when sensor passing from power-down to power-up. an unsigned int. like, you gotta let her wake up first, give her a minute 😭
ngl bootime is such a mood β€” "samples to discard when sensor passing from power-down to power-up" is basically me for the first 20 minutes after a nap. πŸ™ˆ

πŸ” SEE ALSO πŸ”

go read these next, fr fr β€” they're all in the kernel file ./include/linux/iio/common/st_sensors.h:

  • struct st_sensor_bdu(9)
  • struct st_sensor_das(9)
  • struct st_sensor_int_drdy(9)
  • struct st_sensor_data_ready_irq(9)
  • struct st_sensor_data(9)

and like, the whole struct family lives under struct st_sensor_settings in that header, so it's giving big friend-group energy. 🫢


that's the whole page, bestie, you ate that. πŸ’– and for the cute sign-off: this came from ./include/linux/iio/common, dated October 2026, and it's the manpage for struct st_sensor_settings(9). slay, go configure some sensors. πŸ’…βœ¨

πŸ“¦ where this page comes from