STRUCT ST_SENSORS_PLATFORM_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

struct st_sensors_platform_data β€” literally the platform data for the ST sensors, bestie, that's the whole vibe ✨

So this is a page from the Kernel API Manual (iykyk), and it's all about one lil struct that carries the setup info for ST sensors. Not me being obsessed with platform data at this hour πŸ™ˆ


✨ SYNOPSIS ✨

struct st_sensors_platform_data {
    u8 drdy_int_pin;
    bool open_drain;
    bool spi_3wire;
    bool pullups;
    bool wakeup_source;
 };

That's the whole struct, no cap. Five fields, and every single one of them matters πŸ’–


πŸŽ€ Members πŸŽ€

  • drdy_int_pin β€” redirects DRDY onto pin 1 (1) or pin 2 (2). Available only for accelerometer, magnetometer and pressure sensors, okay? And heads up: accelerometer DRDY on LSM330 is available only on pin 1 (go check the datasheet, babes πŸ“„). Magnetometer DRDY is supported only on LSM9DS0 and LSM303D. So don't come for me if your other sensor doesn't do the thing πŸ’€
  • open_drain β€” sets the interrupt line to be open drain if possible. Lowkey yes please ⚑
  • spi_3wire β€” enables spi-3wire mode. Slay, fewer wires πŸ¦‹
  • pullups β€” enable/disable i2c controller pullup resistors. Tiny resistors, big main character energy πŸ”₯
  • wakeup_source β€” enable/disable the device as a wakeup generator. It literally wakes things up. That's the job. πŸ‘‘

🌈 SEE ALSO 🌈

Kernel file ./include/linux/platform_data/st_sensors_pdata.h β€” go read it, it's giving source of truth 🫢


Fr fr, everything above is straight from the page β€” I'm just here making it cute πŸ’œ

Okay that's the whole thing, bestie! This was struct st_s...latform_data(9) from the Kernel API Manual, living over in ./include/linux/platform_data, dated October 2026 πŸŽ€ Mark your calendars, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from