devm_fwnode..._get_by_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_fwnode..._get_by_name(9) ✨

okay so bestie, welcome to the Kernel API Manual 😌 this one lives in ./include/linux/iio and honestly? she's a whole vibe. buckle up πŸŽ€


🌸 NAME 🌸

devm_fwnode_iio_channel_get_by_name β€” it's literally the resource-managed version of fwnode_iio_channel_get_by_name(), no cap πŸ’–


✨ SYNOPSIS ✨

struct iio_channel * devm_fwnode_iio_channel_get_by_name (struct device
*dev , struct fwnode_handle *fwnode , const char *consumer_channel );

that's the whole signature, bestie β€” three args, one struct iio_channel * coming back at you πŸ¦‹


🫢 ARGUMENTS 🫢

  • dev β€” pointer to the consumer device. that's your device, main character energy πŸ‘‘
  • fwnode β€” pointer to the consumer Firmware node 🌈
  • consumer_channel β€” a unique name so you can identify the channel on the consumer side. it typically describes how the channel gets used inside the consumer β€” like, for example, 'battery_voltage' πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: it returns a pointer to a negative errno if it can't get the iio channel 😭 otherwise it returns a valid pointer for the iio channel. slay πŸ’…

and the best part? the allocated iio channel is automatically released when the device is unbound β€” devm really said "i'll handle it, you go be great" ✨


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, fr fr β€” and also the kernel file ./include/linux/iio/consumer.h:

struct iio_channel(9), iio_channel_get(9), iio_channel_release(9), devm_iio_channel_get(9), iio_channel_get_all(9), iio_channel_release_all(9), devm_iio_channel_get_all(9), fwnode_iio_channel_get_by_name(9), iio_channel_get_all_cb(9), iio_channel_cb_set_buffer_watermark(9), iio_channel_release_all_cb(9), iio_channel_start_all_cb(9), iio_channel_stop_all_cb(9), iio_channel_cb_get_channels(9), iio_channel_cb_get_iio_dev(9), iio_read_channel_raw(9), iio_read_channel_average_raw(9), iio_read_channel_processed(9), iio_read_channel_processed_scale(9), iio_write_channel_attribute(9), iio_read_channel_attribute(9), iio_write_channel_raw(9), iio_read_max_channel_raw(9), iio_read_min_channel_raw(9), iio_read_avail_channel_raw(9), iio_read_avail_channel_attribute(9), iio_get_channel_type(9), iio_read_channel_offset(9), iio_read_channel_scale(9), iio_multiply_value(9), iio_convert_raw_to_processed(9), iio_get_channel_ext_info_count(9), iio_read_channel_ext_info(9), iio_write_channel_ext_info(9), iio_read_channel_label(9)

like, that's the entire roster β€” not me listing all of them πŸ’€ but every single one is here, i would never leave a bestie out 🫢


ok that's the page!! ily, go read your sensors πŸ’–

and finally, the cute lil sign-off: this one's filed under ./include/linux/iio, from October 2026, and it's the devm_fwnode..._get_by_name(9) page of the Kernel API Manual 🌸 periodt.

πŸ“¦ where this page comes from