ZPA2326 THEORY OF OPERATIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ ZPA2326 theory of operations πŸŽ€

okay bestie, this is the Kernel API Manual entry for ZPA2326 theory of operations, section 9 β€” iykyk πŸ’… it's literally the whole theory of how this driver operates, so grab a lil snack and let's get into it ✨


✨ DESCRIPTION ✨

so this driver is out here supporting INDIO_DIRECT_MODE and INDIO_BUFFER_TRIGGERED IIO modes β€” both of them, no cap 🫢 An internal hardware trigger is also implemented, and its whole job is to dispatch registered IIO trigger consumers when the "sample ready" interrupts show up πŸ”₯

the ZPA2326 hardware supports 2 sampling mode: one shot and continuous. two modes, both iconic.

πŸ¦‹ one shot mode

a complete one shot sampling cycle gets the device out of low power mode, performs pressure and temperature measurements, then automatically switches back to low power mode. it's giving on demand sampling with optimal power saving, at the cost of lower sampling rate and higher software overhead 😭 a tradeoff, but make it energy efficient ✨

this is a natural candidate for the IIO read_raw hook implementation (INDIO_DIRECT_MODE). it's also used for triggered buffering support to ensure explicit synchronization with external trigger events (INDIO_BUFFER_TRIGGERED).

🌈 continuous mode

the continuous mode works according to a periodic hardware measurement process, continuously pushing samples into an internal hardware FIFO (pressure samples only, bestie β€” just pressure πŸ’œ). measurement cycle completion may be signaled by a "sample ready" interrupt. typical software sequence of operations:

  • get device out of low power mode,
  • setup hardware sampling period,
  • at end of period, upon data ready interrupt: pop pressure samples out of hardware FIFO and fetch temperature sample
  • when no longer needed, stop sampling process by putting device into low power mode. this mode is used to implement INDIO_BUFFER_TRIGGERED mode if device tree declares a valid interrupt line. in this case, the internal hardware trigger drives acquisition.
πŸ’… note: hardware sampling frequency is taken into account only when the internal hardware trigger is attached as the highest sampling rate seems to be the most energy efficient. no cap.

😭 TODO (the "we will get to it" list)

  • preset pressure threshold crossing / IIO events
  • differential pressure sampling
  • hardware samples averaging

πŸ‘€ SEE ALSO πŸ‘€

kernel file ./drivers/iio/pressure/zpa2326.c, plus the whole friend group:


and that's the whole page, bestie 🫢 source is ./drivers/iio/pressure, dated October 2026 β€” go forth and read those pressure samples, you absolute main character πŸ‘‘πŸ’–

πŸ“¦ where this page comes from