STRUCT SSP_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct ssp_data(9) β€” like, the ssp platformdata structure, bestie πŸŽ€

okay so this is a page from the Kernel API Manual and honestly? it's kind of a whole vibe. sit down, grab a strawberry drink πŸ“, and let's get into struct ssp_data β€” the ssp platformdata structure itself. no cap, it's a big one.


✨ NAME ✨

struct ssp_data β€” ssp platformdata structure πŸ’–


🌸 SYNOPSIS 🌸

okay so picture this β€” the whole struct, exactly as it lives:

struct ssp_data {
    struct spi_device *spi;
    const struct ssp_sensorhub_info *sensorhub_info;
    struct timer_list wdt_timer;
    struct work_struct work_wdt;
    struct delayed_work work_refresh;
    bool shut_down;
    bool mcu_dump_mode;
    bool time_syncing;
    int64_t timestamp;
    int check_status[SSP_SENSOR_MAX];
    unsigned int com_fail_cnt;
    unsigned int reset_cnt;
    unsigned int timeout_cnt;
    unsigned int available_sensors;
    unsigned int cur_firm_rev;
    char last_resume_state;
    char last_ap_state;
    unsigned int sensor_enable;
    u32 delay_buf[SSP_SENSOR_MAX];
    s32 batch_latency_buf[SSP_SENSOR_MAX];
    s8 batch_opt_buf[SSP_SENSOR_MAX];
    int accel_position;
    int mag_position;
    int fw_dl_state;
    struct mutex comm_lock;
    struct mutex pending_lock;
    struct gpio_desc *mcu_reset_gpiod;
    struct gpio_desc *ap_mcu_gpiod;
    struct gpio_desc *mcu_ap_gpiod;
    struct list_head pending_list;
    struct iio_dev *sensor_devs[SSP_SENSOR_MAX];
    atomic_t enable_refcount;
    __le16 header_buffer[SSP_HEADER_BUFFER_SIZE / sizeof(__le16)];
};

like, she's serving structure. periodt. πŸ‘‘


πŸ’… MEMBERS πŸ’…

every single field, bestie, in order, no skips β€” here we go 🫢

  • spi β€” the spi device. that's her.
  • sensorhub_info β€” info about sensorhub board specific features 🌈
  • wdt_timer β€” watchdog timer ⏰
  • work_wdt β€” watchdog work
  • work_refresh β€” refresh work queue for reset request from MCU. she refreshes. iconic.
  • shut_down β€” shut down flag
  • mcu_dump_mode β€” mcu dump mode for debug πŸ”₯
  • time_syncing β€” time syncing indication flag
  • timestamp β€” previous time in ns calculated for time syncing (nanoseconds, not vibes)
  • check_status β€” status table for each sensor
  • com_fail_cnt β€” communication fail count 😭 (we've all been there)
  • reset_cnt β€” reset count
  • timeout_cnt β€” timeout count
  • available_sensors β€” available sensors seen by sensorhub (bit array)
  • cur_firm_rev β€” cached current firmware revision
  • last_resume_state β€” last AP resume/suspend state used to handle the PM state of ssp
  • last_ap_state β€” (obsolete) sleep notification for MCU. lowkey legacy, but she's still here πŸ’€
  • sensor_enable β€” sensor enable mask
  • delay_buf β€” data acquisition intervals table
  • batch_latency_buf β€” yet unknown but existing in communication protocol πŸ™ˆ
  • batch_opt_buf β€” yet unknown but existing in communication protocol
  • accel_position β€” yet unknown but existing in communication protocol
  • mag_position β€” yet unknown but existing in communication protocol
  • fw_dl_state β€” firmware download state
  • comm_lock β€” lock protecting the handshake 🀝
  • pending_lock β€” lock protecting pending list and completion
  • mcu_reset_gpiod β€” mcu reset line
  • ap_mcu_gpiod β€” ap to mcu gpio line
  • mcu_ap_gpiod β€” mcu to ap gpio line
  • pending_list β€” pending list for messages queued to be sent/read
  • sensor_devs β€” registered IIO devices table πŸŽ€
  • enable_refcount β€” enable reference count for wdt (watchdog timer)
  • header_buffer β€” cache aligned buffer for packet header ✨
ngl the four "yet unknown but existing in communication protocol" fields are giving mystery main character energy β€” they're literally in the struct, they're literally undocumented beyond existing, and we respect them for it πŸ¦‹

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/iio/common/ssp_sensors/ssp.h β€” go read the source, iykyk πŸ’œ

and that's the whole page, bestie!! remember: this was the Kernel API Manual, struct ssp_data(9), from ./drivers/iio/common/ssp_sensors, dated October 2026. slay, go forth, and read your headers πŸŒŸπŸ’–πŸŽ€

πŸ“¦ where this page comes from