STRUCT SSP_DATA(9)
π 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 workwork_refreshβ refresh work queue for reset request from MCU. she refreshes. iconic.shut_downβ shut down flagmcu_dump_modeβ mcu dump mode for debug π₯time_syncingβ time syncing indication flagtimestampβ previous time in ns calculated for time syncing (nanoseconds, not vibes)check_statusβ status table for each sensorcom_fail_cntβ communication fail count π (we've all been there)reset_cntβ reset counttimeout_cntβ timeout countavailable_sensorsβ available sensors seen by sensorhub (bit array)cur_firm_revβ cached current firmware revisionlast_resume_stateβ last AP resume/suspend state used to handle the PM state of ssplast_ap_stateβ (obsolete) sleep notification for MCU. lowkey legacy, but she's still here πsensor_enableβ sensor enable maskdelay_bufβ data acquisition intervals tablebatch_latency_bufβ yet unknown but existing in communication protocol πbatch_opt_bufβ yet unknown but existing in communication protocolaccel_positionβ yet unknown but existing in communication protocolmag_positionβ yet unknown but existing in communication protocolfw_dl_stateβ firmware download statecomm_lockβ lock protecting the handshake π€pending_lockβ lock protecting pending list and completionmcu_reset_gpiodβ mcu reset lineap_mcu_gpiodβ ap to mcu gpio linemcu_ap_gpiodβ mcu to ap gpio linepending_listβ pending list for messages queued to be sent/readsensor_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
- 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