=sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextEnglish}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget/iio/iio_configfsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/iio/iio_configfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/iio/iio_configfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/iio/iio_configfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/iio/iio_configfsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/iio/iio_configfsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageChinese (Simplified)uh1h hh _documenthsourceNlineNubhnote)}(hX{此文件的目的是为让中文读者更容易阅读和理解,而不是作为一个分支。 因此, 如果您对此文件有任何意见或更新,请先尝试更新原始英文文件。 如果您发现本文档与原始文件有任何不同或者有翻译问题,请发建议或者补丁给 该文件的译者,或者请求中文文档维护者和审阅者的帮助。h]h paragraph)}(hX{此文件的目的是为让中文读者更容易阅读和理解,而不是作为一个分支。 因此, 如果您对此文件有任何意见或更新,请先尝试更新原始英文文件。 如果您发现本文档与原始文件有任何不同或者有翻译问题,请发建议或者补丁给 该文件的译者,或者请求中文文档维护者和审阅者的帮助。h]hX{此文件的目的是为让中文读者更容易阅读和理解,而不是作为一个分支。 因此, 如果您对此文件有任何意见或更新,请先尝试更新原始英文文件。 如果您发现本文档与原始文件有任何不同或者有翻译问题,请发建议或者补丁给 该文件的译者,或者请求中文文档维护者和审阅者的帮助。}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh5Documentation/translations/zh_CN/disclaimer-zh_CN.rsthKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh field_list)}(hhh](hfield)}(hhh](h field_name)}(hOriginalh]hOriginal}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhQ/var/lib/git/docbuild/linux/Documentation/translations/zh_CN/iio/iio_configfs.rsthKubh field_body)}(h#Documentation/iio/iio_configfs.rst h]h)}(h"Documentation/iio/iio_configfs.rsth]h"Documentation/iio/iio_configfs.rst}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h翻译h]h翻译}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh)}(h-司延腾 Yanteng Si h]h)}(h,司延腾 Yanteng Si h](h司延腾 Yanteng Si <}(hjhhhNhNubh reference)}(hsiyanteng@loongson.cnh]hsiyanteng@loongson.cn}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:siyanteng@loongson.cnuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtarget)}(h.. _cn_iio_configfs:h]h}(h]h ]h"]h$]h&]refidcn-iio-configfsuh1jDhKhhhhhhubhsection)}(hhh](htitle)}(h工业 IIO configfs支持h]h工业 IIO configfs支持}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjThhhhhK ubjS)}(hhh](jX)}(h 1. 概述h]h 1. 概述}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjghhhhhKubh)}(hConfigfs是一种内核对象的基于文件系统的管理系统,IIO使用一些可以通过 configfs轻松配置的对象(例如:设备,触发器)。h]hConfigfs是一种内核对象的基于文件系统的管理系统,IIO使用一些可以通过 configfs轻松配置的对象(例如:设备,触发器)。}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjghhubh)}(hh关于configfs是如何运行的,请查阅Documentation/filesystems/configfs.rst 了解更多信息。h]hh关于configfs是如何运行的,请查阅Documentation/filesystems/configfs.rst 了解更多信息。}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjghhubeh}(h]id1ah ]h"] 1. 概述ah$]h&]uh1jRhjThhhhhKubjS)}(hhh](jX)}(h 2. 用法h]h 2. 用法}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjhhhhhKubh)}(ha为了使configfs支持IIO,我们需要在编译时选中config的CONFIG_IIO_CONFIGFS 选项。h]ha为了使configfs支持IIO,我们需要在编译时选中config的CONFIG_IIO_CONFIGFS 选项。}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hQ然后,挂载configfs文件系统(通常在 /config directory目录下)::h]hQ然后,挂载configfs文件系统(通常在 /config directory目录下)::}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh block_quote)}(h/$ mkdir/config $ mount -t configfs none/config h]h)}(h.$ mkdir/config $ mount -t configfs none/configh]h.$ mkdir/config $ mount -t configfs none/config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(h此时,将创建所有默认IIO组,并可以在/ config / iio下对其进行访问。 下一章 将介绍可用的IIO配置对象。h]h此时,将创建所有默认IIO组,并可以在/ config / iio下对其进行访问。 下一章 将介绍可用的IIO配置对象。}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjhhubeh}(h]id2ah ]h"] 2. 用法ah$]h&]uh1jRhjThhhhhKubjS)}(hhh](jX)}(h3. 软件触发器h]h3. 软件触发器}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjhhhhhK&ubh)}(hIIO默认configfs组之一是“触发器”组。挂载configfs后可以自动访问它,并且可 以在/config/iio/triggers下找到。h]hIIO默认configfs组之一是“触发器”组。挂载configfs后可以自动访问它,并且可 以在/config/iio/triggers下找到。}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjhhubh)}(hIIO软件触发器为创建多种触发器类型提供了支持。通常在include/linux/iio /sw_trigger.h:中的接口下将新的触发器类型实现为单独的内核模块: ::h]hIIO软件触发器为创建多种触发器类型提供了支持。通常在include/linux/iio /sw_trigger.h:中的接口下将新的触发器类型实现为单独的内核模块:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjhhubh literal_block)}(hX7/* * drivers/iio/trigger/iio-trig-sample.c * 一种新触发器类型的内核模块实例 */ #include static struct iio_sw_trigger *iio_trig_sample_probe(const char *name) { /* * 这将分配并注册一个IIO触发器以及其他触发器类型特性的初始化。 */ } static int iio_trig_sample_remove(struct iio_sw_trigger *swt) { /* * 这会废弃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]hX7/* * drivers/iio/trigger/iio-trig-sample.c * 一种新触发器类型的内核模块实例 */ #include static struct iio_sw_trigger *iio_trig_sample_probe(const char *name) { /* * 这将分配并注册一个IIO触发器以及其他触发器类型特性的初始化。 */ } static int iio_trig_sample_remove(struct iio_sw_trigger *swt) { /* * 这会废弃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&] xml:spacepreserveuh1j&hhhK/hjhhubh)}(h每种触发器类型在/config/iio/triggers下都有其自己的目录。加载iio-trig-sample 模块将创建“trig-sample”触发器类型目录/config/iio/triggers/trig-sample.h]h每种触发器类型在/config/iio/triggers下都有其自己的目录。加载iio-trig-sample 模块将创建“trig-sample”触发器类型目录/config/iio/triggers/trig-sample.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjhhubh)}(h0我们支持以下中断源(触发器类型)h]h0我们支持以下中断源(触发器类型)}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjhhubj)}(h5* hrtimer,使用高分辨率定时器作为中断源 h]h bullet_list)}(hhh]h list_item)}(h3hrtimer,使用高分辨率定时器作为中断源 h]h)}(h2hrtimer,使用高分辨率定时器作为中断源h]h2hrtimer,使用高分辨率定时器作为中断源}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhj_ubah}(h]h ]h"]h$]h&]uh1j]hjZubah}(h]h ]h"]h$]h&]bullet*uh1jXhhhKVhjTubah}(h]h ]h"]h$]h&]uh1jhhhKVhjhhubjS)}(hhh](jX)}(h#3.1 Hrtimer触发器创建与销毁h]h#3.1 Hrtimer触发器创建与销毁}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjhhhhhKYubh)}(h加载iio-trig-hrtimer模块将注册hrtimer触发器类型,从而允许用户在 /config/iio/triggers/hrtimer下创建hrtimer触发器。h]h加载iio-trig-hrtimer模块将注册hrtimer触发器类型,从而允许用户在 /config/iio/triggers/hrtimer下创建hrtimer触发器。}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjhhubh)}(h例如::h]h例如:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjhhubj')}(h]$ mkdir /config/iio/triggers/hrtimer/instance1 $ rmdir /config/iio/triggers/hrtimer/instance1h]h]$ mkdir /config/iio/triggers/hrtimer/instance1 $ rmdir /config/iio/triggers/hrtimer/instance1}hjsbah}(h]h ]h"]h$]h&]j6j7uh1j&hhhK`hjhhubh)}(hN每个触发器可以具有一个或多个独特的触发器类型的属性。h]hN每个触发器可以具有一个或多个独特的触发器类型的属性。}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjhhubeh}(h]hrtimerah ]h"]#3.1 hrtimer触发器创建与销毁ah$]h&]uh1jRhjhhhhhKYubjS)}(hhh](jX)}(h#3.2 "hrtimer" 触发器类型属性h]h'3.2 “hrtimer” 触发器类型属性}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjhhhhhKfubh)}(h"hrtimer”触发器类型没有来自/config dir的任何可配置属性。 它确实引入了触发目录的sampling_frequency属性。 该属性以Hz为单位设置轮询频率,精度为mHz。h]h“hrtimer”触发器类型没有来自/config dir的任何可配置属性。 它确实引入了触发目录的sampling_frequency属性。 该属性以Hz为单位设置轮询频率,精度为mHz。}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjhhubeh}(h]id4ah ]h"]#3.2 "hrtimer" 触发器类型属性ah$]h&]uh1jRhjhhhhhKfubeh}(h]id3ah ]h"]3. 软件触发器ah$]h&]uh1jRhjThhhhhK&ubeh}(h]( iio-configfsjQeh ]h"](工业 iio configfs支持cn_iio_configfseh$]h&]uh1jRhhhhhhhK expect_referenced_by_name}j jFsexpect_referenced_by_id}jQjFsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(jWN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj5error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh، _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}jQ]jFasnameids}(j jQj jjjjjjjjjjju nametypes}(j j jjjjjuh}(jQjTjjTjjgjjjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jCKsRparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h5Hyperlink target "cn-iio-configfs" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourceh،lineKuh1juba transformerN include_log]5Documentation/translations/zh_CN/iio/iio_configfs.rst(NNNNta decorationNhhub.