comedi_check_trigger_src(9)
π comedi_check_trigger_src(9) β your fave lil trigger validator
okay so this one lives in the Kernel API Manual bestie, and it's genuinely one of the chillest little helpers in the comedi-verse. no cap, it's giving "bouncer at the club checking IDs" energy π«Ά
β¨ SYNOPSIS β¨
int comedi_check_trigger_src (unsigned int *src , unsigned int flags );
π ARGUMENTS π
srcβ pointer to the trigger source you wanna validate. like, hand it over and let it do its thing πflagsβ the bitmask of validTRIG_*values for this particular trigger. this is the rulebook, the vibe check, the guest list πΈ
π« DESCRIPTION π«
so bestie, picture this: you're writing a comedi driver, and you've got a do_cmdtest function, and you're on "step 1" of it. that's literally where this function lives. it's the designated bouncer for your comedi_cmd triggers π
it validates the comedi_cmd triggers by masking src against flags. and the reason that masking is so iconic? it lets userspace comedilib pass all the comedi_cmd triggers in as TRIG_ANY and get back a bitmask of the valid trigger sources. literally so convenient, we love a mutual exchange π₯
β RETURN β
0β everything in*srcis supported. slay, we're so back β¨-EINVALβ one or more of the trigger sources in*srcis not supported. it's giving rejected at the door π
π SEE ALSO π
okay this list is a whole friend group, buckle up:
- Kernel file
./include/linux/comedi/comedidev.h - struct
comedi_subdevice(9) - struct
comedi_buf_page(9) - struct
comedi_buf_map(9) - struct
comedi_async(9) - enum
comedi_cb(9) - struct
comedi_driver(9) - struct
comedi_device(9) - struct
comedi_lrange(9) comedi_range_is_bipolar(9)comedi_range_is_unipolar(9)comedi_range_is_external(9)comedi_chan_range_is_bipolar(9)comedi_chan_range_is_unipolar(9)comedi_chan_range_is_external(9)comedi_offset_munge(9)comedi_bytes_per_sample(9)comedi_sample_shift(9)comedi_bytes_to_samples(9)comedi_samples_to_bytes(9)comedi_check_trigger_is_unique(9)comedi_check_trigger_arg_is(9)comedi_check_trigger_arg_min(9)comedi_check_trigger_arg_max(9)comedi_buf_n_bytes_ready(9)__comedi_request_region(9)comedi_request_region(9)module_comedi_driver(9)
π ngl, if you're poking around do_cmdtest at all, you're gonna bump into the rest of these β they're all part of the same little comedi family. iykyk.
kisses bestie, this page came from ./include/linux/comedi, dated October 2026, and yes it is literally titled comedi_check_trigger_src(9) β go forth and validate those triggers π
π
π¦ 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