STRUCT IIO_DUMMY_STATE(9)
π struct iio_dummy_state π
okay bestie, welcome to the Kernel API Manual, section 9 β we're talking about struct iio_dummy_state, and honestly? It's giving "the whole state of one specific dummy device instance" realness. Every field here is the per-device stash of everything the simple dummy driver needs to remember, iykyk. β¨
πΈ NAME πΈ
struct iio_dummy_state β state that belongs to one specific device instance, no cap, just the device's own lil personal memory box π
β¨ SYNOPSIS β¨
struct iio_dummy_state {
int dac_val;
int single_ended_adc_val;
int differential_adc_val[2];
int accel_val;
int accel_calibbias;
int activity_running;
int activity_walking;
const struct iio_dummy_accel_calibscale *accel_calibscale;
struct mutex lock;
struct iio_dummy_regs *regs;
int steps_enabled;
int steps;
int height;
#ifdef CONFIG_IIO_SIMPLE_DUMMY_EVENTS;
int event_irq;
int event_val;
bool event_en;
s64 event_timestamp;
#endif ;
};
look at her go π
literally the whole struct, exactly as it lives in the kernel β semicolons after the #ifdef and #endif and all, we don't touch, we don't "fix", we simply admire π«Ά
π¦ Members π¦
okay so here's the field-by-field breakdown, group-chat style:
dac_valβ the cache for the dac value βsingle_ended_adc_valβ the cache for the single ended adc value πΈdifferential_adc_valβ the cache for the differential adc value πaccel_valβ the cache for the acceleration value π₯accel_calibbiasβ the cache for the acceleration calibbias πaccel_calibscaleβ the cache for the acceleration calibscale β¨lockβ the lock that makes sure the state stays consistent, aka the bodyguard of this struct, she does not let chaos in πevent_irqβ the irq number for the event line (and yes, it's faked π iconic behaviour honestly)event_valβ the cache for the event threshold value πevent_enβ the cache of whether the event is enabled or not π
bestie note: the Members section only spells out those fields, so that's exactly what we're spelling out. The rest of the struct members are just sitting there looking cute in the SYNOPSIS above β no extra lore invented, periodt π
π SEE ALSO π
- Kernel file
./drivers/iio/dummy/iio_simple_dummy.henum π iio_simple_dummy_scan_elements(9)π§
and that's the whole page, bestie!! π«Ά this gem comes from the source tree at ./drivers/iio/dummy, dated October 2026, under the Kernel API Manual β go forth and keep that dummy state consistent ππ
π¦ 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