comedi_check_chanlist(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ comedi_check_chanlist ✨

okay bestie, welcome to the comedi_check_chanlist(9) page from the Kernel API Manual β€” we're doing a vibe check on chanlists today, and yes, it's giving kernel-dev main character energy. πŸ’…πŸ¦‹

πŸ’– NAME πŸ’–

comedi_check_chanlist β€” Validate each element in a chanlist. literally the whole point, no cap. πŸŽ€

🌸 SYNOPSIS 🌸

int comedi_check_chanlist (struct comedi_subdevice *s , int n , unsigned
       int *chanlist );

πŸŽ€ ARGUMENTS πŸŽ€

  • s β€” the comedi_subdevice struct, bestie. that's the subdevice we're checking against. πŸ’…
  • n β€” number of elements in the chanlist. count 'em. πŸ”’
  • chanlist β€” the chanlist to validate. this is the star of the show. ⭐

πŸ¦‹ DESCRIPTION πŸ¦‹

Each element consists of a channel number, a range index, an analog reference type and some flags, all packed into an unsigned int. it's giving tiny packed struct energy fr fr. 🧚

This checks that the channel number and range index are supported by the comedi subdevice. It does not check whether the analog reference type and the flags are supported. Drivers that care should check those themselves. πŸ‘‘

⚠️ heads up, bestie: this function is not checking analog reference type or flags for you. if your driver cares about those, it has to check them itself. not me finding out the hard way πŸ’€

🫢 RETURN 🫢

  • 0 β€” if all chanlist elements are valid (success), slay. πŸ’–
  • -EINVAL β€” if one or more elements are invalid. 😭

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/comedi/range.c β€” go read it, iykyk. πŸ‘‘

made with πŸ’– for the comedi_check_chanlist(9) page β€” source/version: ./drivers/comedi, date: October 2026. bye bestie! 🫢✨

πŸ“¦ where this page comes from