€•2Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ$/translations/zh_CN/iio/iio_configfs”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/zh_TW/iio/iio_configfs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/it_IT/iio/iio_configfs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ja_JP/iio/iio_configfs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ko_KR/iio/iio_configfs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/sp_SP/iio/iio_configfs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒIndustrial IIO configfs support”h]”hŒIndustrial IIO configfs support”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒ>/var/lib/git/docbuild/linux/Documentation/iio/iio_configfs.rst”h Kubh¢)”}”(hhh]”(h§)”}”(hŒ 1. Overview”h]”hŒ 1. Overview”…””}”(hhºhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh·hžhhŸh¶h KubhŒ paragraph”“”)”}”(hŒ™Configfs is a filesystem-based manager of kernel objects. IIO uses some objects that could be easily configured using configfs (e.g.: devices, triggers).”h]”hŒ™Configfs is a filesystem-based manager of kernel objects. IIO uses some objects that could be easily configured using configfs (e.g.: devices, triggers).”…””}”(hhÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubhÉ)”}”(hŒYSee Documentation/filesystems/configfs.rst for more information about how configfs works.”h]”hŒYSee Documentation/filesystems/configfs.rst for more information about how configfs works.”…””}”(hhØhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K hh·hžhubeh}”(h]”Œoverview”ah ]”h"]”Œ 1. overview”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ2. Usage”h]”hŒ2. Usage”…””}”(hhñhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hhîhžhhŸh¶h KubhÉ)”}”(hŒsIn order to use configfs support in IIO we need to select it at compile time via CONFIG_IIO_CONFIGFS config option.”h]”hŒsIn order to use configfs support in IIO we need to select it at compile time via CONFIG_IIO_CONFIGFS config option.”…””}”(hhÿhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KhhîhžhubhÉ)”}”(hŒGThen, mount the configfs filesystem (usually under /config directory)::”h]”hŒFThen, mount the configfs filesystem (usually under /config directory):”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KhhîhžhubhŒ literal_block”“”)”}”(hŒ0$ mkdir /config $ mount -t configfs none /config”h]”hŒ0$ mkdir /config $ mount -t configfs none /config”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jhŸh¶h KhhîhžhubhÉ)”}”(hŒAt this point, all default IIO groups will be created and can be accessed under /config/iio. Next chapters will describe available IIO configuration objects.”h]”hŒAt this point, all default IIO groups will be created and can be accessed under /config/iio. Next chapters will describe available IIO configuration objects.”…””}”(hj-hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khhîhžhubeh}”(h]”Œusage”ah ]”h"]”Œ2. usage”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ3. Software triggers”h]”hŒ3. Software triggers”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjChžhhŸh¶h KubhÉ)”}”(hŒ¨One of the IIO default configfs groups is the "triggers" group. It is automagically accessible when the configfs is mounted and can be found under /config/iio/triggers.”h]”hŒ¬One of the IIO default configfs groups is the “triggers†group. It is automagically accessible when the configfs is mounted and can be found under /config/iio/triggers.”…””}”(hjThžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K!hjChžhubhÉ)”}”(hŒÚIIO software triggers implementation offers support for creating multiple trigger types. A new trigger type is usually implemented as a separate kernel module following the interface in include/linux/iio/sw_trigger.h::”h]”hŒÙIIO software triggers implementation offers support for creating multiple trigger types. A new trigger type is usually implemented as a separate kernel module following the interface in include/linux/iio/sw_trigger.h:”…””}”(hjbhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K%hjChžhubj)”}”(hXO/* * drivers/iio/trigger/iio-trig-sample.c * sample kernel module implementing a new trigger type */ #include static struct iio_sw_trigger *iio_trig_sample_probe(const char *name) { /* * This allocates and registers an IIO trigger plus other * trigger type specific initialization. */ } static int iio_trig_sample_remove(struct iio_sw_trigger *swt) { /* * This undoes the actions in iio_trig_sample_probe */ } static const struct iio_sw_trigger_ops iio_trig_sample_ops = { .probe = iio_trig_sample_probe, .remove = iio_trig_sample_remove, }; static struct iio_sw_trigger_type iio_trig_sample = { .name = "trig-sample", .owner = THIS_MODULE, .ops = &iio_trig_sample_ops, }; module_iio_sw_trigger_driver(iio_trig_sample);”h]”hXO/* * drivers/iio/trigger/iio-trig-sample.c * sample kernel module implementing a new trigger type */ #include static struct iio_sw_trigger *iio_trig_sample_probe(const char *name) { /* * This allocates and registers an IIO trigger plus other * trigger type specific initialization. */ } static int iio_trig_sample_remove(struct iio_sw_trigger *swt) { /* * This undoes the actions in iio_trig_sample_probe */ } static const struct iio_sw_trigger_ops iio_trig_sample_ops = { .probe = iio_trig_sample_probe, .remove = iio_trig_sample_remove, }; static struct iio_sw_trigger_type iio_trig_sample = { .name = "trig-sample", .owner = THIS_MODULE, .ops = &iio_trig_sample_ops, }; module_iio_sw_trigger_driver(iio_trig_sample);”…””}”hjpsbah}”(h]”h ]”h"]”h$]”h&]”j+j,uh1jhŸh¶h K)hjChžhubhÉ)”}”(hŒµEach trigger type has its own directory under /config/iio/triggers. Loading iio-trig-sample module will create 'trig-sample' trigger type directory /config/iio/triggers/trig-sample.”h]”hŒ¹Each trigger type has its own directory under /config/iio/triggers. Loading iio-trig-sample module will create ‘trig-sample’ trigger type directory /config/iio/triggers/trig-sample.”…””}”(hj~hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KLhjChžhubhÉ)”}”(hŒ;We support the following interrupt sources (trigger types):”h]”hŒ;We support the following interrupt sources (trigger types):”…””}”(hjŒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KPhjChžhubhŒ block_quote”“”)”}”(hŒ;* hrtimer, uses high resolution timers as interrupt source ”h]”hŒ bullet_list”“”)”}”(hhh]”hŒ list_item”“”)”}”(hŒ9hrtimer, uses high resolution timers as interrupt source ”h]”hÉ)”}”(hŒ8hrtimer, uses high resolution timers as interrupt source”h]”hŒ8hrtimer, uses high resolution timers as interrupt source”…””}”(hj«hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KRhj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj¢ubah}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1j hŸh¶h KRhjœubah}”(h]”h ]”h"]”h$]”h&]”uh1jšhŸh¶h KRhjChžhubh¢)”}”(hhh]”(h§)”}”(hŒ-3.1 Hrtimer triggers creation and destruction”h]”hŒ-3.1 Hrtimer triggers creation and destruction”…””}”(hjÐhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÍhžhhŸh¶h KUubhÉ)”}”(hŒ‘Loading iio-trig-hrtimer module will register hrtimer trigger types allowing users to create hrtimer triggers under /config/iio/triggers/hrtimer.”h]”hŒ‘Loading iio-trig-hrtimer module will register hrtimer trigger types allowing users to create hrtimer triggers under /config/iio/triggers/hrtimer.”…””}”(hjÞhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KWhjÍhžhubhÉ)”}”(hŒe.g::”h]”hŒe.g:”…””}”(hjìhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KZhjÍhžhubj)”}”(hŒ]$ mkdir /config/iio/triggers/hrtimer/instance1 $ rmdir /config/iio/triggers/hrtimer/instance1”h]”hŒ]$ mkdir /config/iio/triggers/hrtimer/instance1 $ rmdir /config/iio/triggers/hrtimer/instance1”…””}”hjúsbah}”(h]”h ]”h"]”h$]”h&]”j+j,uh1jhŸh¶h K\hjÍhžhubhÉ)”}”(hŒJEach trigger can have one or more attributes specific to the trigger type.”h]”hŒJEach trigger can have one or more attributes specific to the trigger type.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K_hjÍhžhubeh}”(h]”Œ)hrtimer-triggers-creation-and-destruction”ah ]”h"]”Œ-3.1 hrtimer triggers creation and destruction”ah$]”h&]”uh1h¡hjChžhhŸh¶h KUubh¢)”}”(hhh]”(h§)”}”(hŒ&3.2 "hrtimer" trigger types attributes”h]”hŒ*3.2 “hrtimer†trigger types attributes”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h KbubhÉ)”}”(hŒÞ"hrtimer" trigger type doesn't have any configurable attribute from /config dir. It does introduce the sampling_frequency attribute to trigger directory. That attribute sets the polling frequency in Hz, with mHz precision.”h]”hŒä“hrtimer†trigger type doesn’t have any configurable attribute from /config dir. It does introduce the sampling_frequency attribute to trigger directory. That attribute sets the polling frequency in Hz, with mHz precision.”…””}”(hj/hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Kdhjhžhubeh}”(h]”Œ hrtimer-trigger-types-attributes”ah ]”h"]”Œ&3.2 "hrtimer" trigger types attributes”ah$]”h&]”uh1h¡hjChžhhŸh¶h Kbubeh}”(h]”Œsoftware-triggers”ah ]”h"]”Œ3. software triggers”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubeh}”(h]”Œindustrial-iio-configfs-support”ah ]”h"]”Œindustrial iio configfs support”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jxŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jRjOhëhèj@j=jJjGjjjBj?uŒ nametypes”}”(jR‰hë‰j@‰jJ‰j‰jB‰uh}”(jOh£hèh·j=hîjGjCjjÍj?juŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.