€•3Œ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/pt_BR/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”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²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.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khjh²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´Khjh²hubhŒ literal_block”“”)”}”(hŒ0$ mkdir /config $ mount -t configfs none /config”h]”hŒ0$ mkdir /config $ mount -t configfs none /config”…””}”hj1sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j/h³hÊh´Khjh²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.”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khjh²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”…””}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjWh²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.”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K!hjWh²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:”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K%hjWh²hubj0)”}”(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);”…””}”hj„sbah}”(h]”h ]”h"]”h$]”h&]”j?j@uh1j/h³hÊh´K)hjWh²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´KLhjWh²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´KPhjWh²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´KRhjWh²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:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KZhjáh²hubj0)”}”(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”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j?j@uh1j/h³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µhjWh²hh³hÊh´KUubh¶)”}”(hhh]”(h»)”}”(hŒ&3.2 "hrtimer" trigger types attributes”h]”hŒ*3.2 “hrtimer†trigger types attributes”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj2h²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.”…””}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kdhj2h²hubeh}”(h]”Œ hrtimer-trigger-types-attributes”ah ]”h"]”Œ&3.2 "hrtimer" trigger types attributes”ah$]”h&]”uh1hµhjWh²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”jŒŒ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”}”(jfjchÿhüjTjQj^j[j/j,jVjSuŒ nametypes”}”(jf‰hÿ‰jT‰j^‰j/‰jV‰uh}”(jch·hühËjQjj[jWj,jájSj2uŒ 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.