ZPA2326 THEORY OF OPERATIONS(9)
π 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_TRIGGEREDmode 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:
struct zpa2326_frequency(9)struct zpa2326_private(9)zpa2326_enable_device(9)zpa2326_sleep(9)zpa2326_reset_device(9)zpa2326_start_oneshot(9)zpa2326_power_on(9)zpa2326_power_off(9)zpa2326_config_oneshot(9)zpa2326_clear_fifo(9)zpa2326_dequeue_pressure(9)zpa2326_fill_sample_buffer(9)zpa2326_resume(9)zpa2326_suspend(9)zpa2326_handle_irq(9)zpa2326_handle_threaded_irq(9)zpa2326_wait_oneshot_completion(9)zpa2326_poll_oneshot_completion(9)zpa2326_fetch_raw_sample(9)zpa2326_sample_oneshot(9)zpa2326_trigger_handler(9)zpa2326_preenable_buffer(9)zpa2326_postenable_buffer(9)zpa2326_set_trigger_state(9)zpa2326_init_managed_trigger(9)
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
- 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