iio_device_get_current_mode(9)
π
iio_device_get_current_mode(9) π
okay so bestie, welcome to the Kernel API Manual, section 9 β this is where the kernel's own docs live, and today's main character is a tiny little getter function. she's small, she's read-only, she's iconic. let's get into it π
β¨ NAME β¨
iio_device_get_current_mode β a helper function giving you read-only access to the opaque @currentmode variable π«Ά
like, that's it. that's her whole job. no cap. she does not let you set anything, she just lets you peek. respect the boundaries bestie π
πΈ SYNOPSIS πΈ
int iio_device_get_current_mode (struct iio_dev *indio_dev );
literally one line, one call, one return value. we love a low-maintenance function π
π¦ ARGUMENTS π¦
indio_devβ the IIO device structure for the device π§ this is the thing you're asking about, the whole reason you showed up fr fr
π SEE ALSO π
okay so there's a whole group chat of related functions and the kernel file they live in β the manpage points at the kernel file ./drivers/iio/industrialio-core.c, and then name-drops the entire friend group:
iio_device_id(9)iio_buffer_enabled(9)iio_find_channel_from_si(9)iio_device_set_clock(9)iio_device_get_clock(9)iio_get_time_ns(9)iio_read_mount_matrix(9)iio_format_value(9)__iio_str_to_fixpoint(9)iio_str_to_fixpoint(9)iio_free_chan_devattr_list(9)iio_device_alloc(9)iio_device_free(9)devm_iio_device_alloc(9)iio_chrdev_open(9)iio_chrdev_release(9)iio_active_scan_mask_index(9)iio_device_unregister(9)__iio_dev_mode_lock(9)__iio_dev_mode_unlock(9)
lowkey the whole IIO squad is in here β if you're doing anything with device modes, start with the lock/unlock pair, iykyk π
and that's the tea π this page lives in ./drivers/iio, and it's stamped October 2026, from your girl the Kernel API Manual β iio_device_get_current_mode(9), signing off πβ¨ keep it read-only, stay iconic, periodt. π
π¦ 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