iio_device_set_drvdata(9)
π iio_device_set_drvdata π
okay so this is a page straight out of the Kernel API Manual (yes, the kernel kernel, like the literal operating system kernel, we're fancy now π) and honestly bestie, it's a tiny one but it's lowkey important. grab a strawberry π and let's go.
β¨ NAME β¨
iio_device_set_drvdata β set device driver data, that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
void iio_device_set_drvdata (struct iio_dev *indio_dev , void *data );
like, it returns nothing, it's a void, it just does the thing and leaves. main character energy fr π«Ά
π¦ ARGUMENTS π¦
indio_devβ the IIO device structure π this is the lil device you're attaching stuff todataβ driver specific data π the arbitrary pointer that's about to find a new home
π DESCRIPTION π
so what this does is it lets you attach an arbitrary pointer to an IIO device β¨ like, any pointer you want, no questions asked.
and then later? you can get it back with iio_device_get_drvdata π it's giving "put it in the group chat, read it later" energy and honestly we love a two-function system.
no cap, that's the whole description. it's a small function but it's iconic in its own way π
π₯ SEE ALSO π₯
okay this part is LONG, bestie, but we do not skip the boring parts in this house π§ every single one of these is going on the list:
Kernel file ./include/linux/iio/iio.h, plus:
struct iio_chan_spec_ext_info(9)struct iio_enum(9)IIO_ENUM(9)IIO_ENUM_AVAILABLE(9)struct iio_mount_matrix(9)IIO_MOUNT_MATRIX(9)struct iio_event_spec(9)IIO_SCAN_FORMAT_SIGNED_INT(9)IIO_SCAN_FORMAT_UNSIGNED_INT(9)IIO_SCAN_FORMAT_FLOAT(9)struct iio_scan_type(9)struct iio_chan_spec(9)iio_channel_has_info(9)iio_channel_has_available(9)struct iio_info(9)struct iio_buffer_setup_ops(9)struct iio_dev(9)iio_device_register(9)devm_iio_device_register(9)iio_device_claim_direct(9)iio_device_release_direct(9)iio_device_try_claim_buffer_mode(9)iio_device_release_buffer_mode(9)IIO_DEV_ACQUIRE_DIRECT_MODE(9)IIO_DEV_ACQUIRE_FAILED(9)IIO_DEV_GUARD_CURRENT_MODE(9)iio_device_put(9)dev_to_iio_dev(9)iio_device_get(9)iio_device_set_parent(9)iio_device_get_drvdata(9)IIO_DECLARE_BUFFER_WITH_TS(9)IIO_DECLARE_DMA_BUFFER_WITH_TS(9)IIO_DECLARE_QUATERNION(9)iio_get_debugfs_dentry(9)iio_device_suspend_triggering(9)iio_device_resume_triggering(9)iio_get_current_scan_type(9)iio_get_masklength(9)iio_for_each_active_channel(9)IIO_DEGREE_TO_RAD(9)IIO_RAD_TO_DEGREE(9)IIO_G_TO_M_S_2(9)IIO_M_S_2_TO_G(9)
like I said. long list. but we read it, we respected it, we moved on π
aaaand that's the page!! π big slay, big ./include/linux/iio energy, dated October 2026 β which is so far away it's basically a time capsule bestie ππ¦ keep it in the group chat, iykyk πβ¨
π¦ 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