€•Æ'Œ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/driver-api/hte/tegra-hte”Œ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/driver-api/hte/tegra-hte”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/driver-api/hte/tegra-hte”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/driver-api/hte/tegra-hte”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/driver-api/hte/tegra-hte”Œ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/driver-api/hte/tegra-hte”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ!SPDX-License-Identifier: GPL-2.0+”h]”hŒ!SPDX-License-Identifier: GPL-2.0+”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒF/var/lib/git/docbuild/linux/Documentation/driver-api/hte/tegra-hte.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒHTE Kernel provider driver”h]”hŒHTE Kernel provider driver”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Description”h]”hŒ Description”…””}”(hhÌhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhÉhžhhŸh³h KubhŒ paragraph”“”)”}”(hXmThe Nvidia tegra HTE provider also known as GTE (Generic Timestamping Engine) driver implements two GTE instances: 1) GPIO GTE and 2) LIC (Legacy Interrupt Controller) IRQ GTE. Both GTE instances get the timestamp from the system counter TSC which has 31.25MHz clock rate, and the driver converts clock tick rate to nanoseconds before storing it as timestamp value.”h]”hXmThe Nvidia tegra HTE provider also known as GTE (Generic Timestamping Engine) driver implements two GTE instances: 1) GPIO GTE and 2) LIC (Legacy Interrupt Controller) IRQ GTE. Both GTE instances get the timestamp from the system counter TSC which has 31.25MHz clock rate, and the driver converts clock tick rate to nanoseconds before storing it as timestamp value.”…””}”(hhÜhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhÉhžhubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒGPIO GTE”h]”hŒGPIO GTE”…””}”(hhõhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhòhžhhŸh³h KubhÛ)”}”(hXªThis GTE instance timestamps GPIO in real time. For that to happen GPIO needs to be configured as input. Only the always on (AON) GPIO controller instance supports timestamping GPIOs in real time as it is tightly coupled with the GPIO GTE. To support this, GPIOLIB adds two optional APIs as mentioned below. The GPIO GTE code supports both kernel and userspace consumers. The kernel space consumers can directly talk to HTE subsystem while userspace consumers timestamp requests go through GPIOLIB CDEV framework to HTE subsystem. The hte devicetree binding described at ``Documentation/devicetree/bindings/timestamp`` provides an example of how a consumer can request an GPIO line.”h]”(hX;This GTE instance timestamps GPIO in real time. For that to happen GPIO needs to be configured as input. Only the always on (AON) GPIO controller instance supports timestamping GPIOs in real time as it is tightly coupled with the GPIO GTE. To support this, GPIOLIB adds two optional APIs as mentioned below. The GPIO GTE code supports both kernel and userspace consumers. The kernel space consumers can directly talk to HTE subsystem while userspace consumers timestamp requests go through GPIOLIB CDEV framework to HTE subsystem. The hte devicetree binding described at ”…””}”(hjhžhhŸNh NubhŒliteral”“”)”}”(hŒ/``Documentation/devicetree/bindings/timestamp``”h]”hŒ+Documentation/devicetree/bindings/timestamp”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubhŒ@ provides an example of how a consumer can request an GPIO line.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhòhžhubhÛ)”}”(hŒGSee gpiod_enable_hw_timestamp_ns() and gpiod_disable_hw_timestamp_ns().”h]”hŒGSee gpiod_enable_hw_timestamp_ns() and gpiod_disable_hw_timestamp_ns().”…””}”(hj%hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhòhžhubhÛ)”}”(hŒ»For userspace consumers, GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE flag must be specified during IOCTL calls. Refer to ``tools/gpio/gpio-event-mon.c``, which returns the timestamp in nanoseconds.”h]”(hŒoFor userspace consumers, GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE flag must be specified during IOCTL calls. Refer to ”…””}”(hj3hžhhŸNh Nubj )”}”(hŒ``tools/gpio/gpio-event-mon.c``”h]”hŒtools/gpio/gpio-event-mon.c”…””}”(hj;hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj3ubhŒ-, which returns the timestamp in nanoseconds.”…””}”(hj3hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h Khhòhžhubeh}”(h]”Œgpio-gte”ah ]”h"]”Œgpio gte”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ)LIC (Legacy Interrupt Controller) IRQ GTE”h]”hŒ)LIC (Legacy Interrupt Controller) IRQ GTE”…””}”(hj^hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj[hžhhŸh³h K#ubhÛ)”}”(hX£This GTE instance timestamps LIC IRQ lines in real time. The hte devicetree binding described at ``Documentation/devicetree/bindings/timestamp`` provides an example of how a consumer can request an IRQ line. Since it is a one-to-one mapping with IRQ GTE provider, consumers can simply specify the IRQ number that they are interested in. There is no userspace consumer support for this GTE instance in the HTE framework.”h]”(hŒaThis GTE instance timestamps LIC IRQ lines in real time. The hte devicetree binding described at ”…””}”(hjlhžhhŸNh Nubj )”}”(hŒ/``Documentation/devicetree/bindings/timestamp``”h]”hŒ+Documentation/devicetree/bindings/timestamp”…””}”(hjthžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjlubhX provides an example of how a consumer can request an IRQ line. Since it is a one-to-one mapping with IRQ GTE provider, consumers can simply specify the IRQ number that they are interested in. There is no userspace consumer support for this GTE instance in the HTE framework.”…””}”(hjlhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K%hj[hžhubhÛ)”}”(hŒÓThe provider source code of both IRQ and GPIO GTE instances is located at ``drivers/hte/hte-tegra194.c``. The test driver ``drivers/hte/hte-tegra194-test.c`` demonstrates HTE API usage for both IRQ and GPIO GTE.”h]”(hŒJThe provider source code of both IRQ and GPIO GTE instances is located at ”…””}”(hjŒhžhhŸNh Nubj )”}”(hŒ``drivers/hte/hte-tegra194.c``”h]”hŒdrivers/hte/hte-tegra194.c”…””}”(hj”hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjŒubhŒ. The test driver ”…””}”(hjŒhžhhŸNh Nubj )”}”(hŒ#``drivers/hte/hte-tegra194-test.c``”h]”hŒdrivers/hte/hte-tegra194-test.c”…””}”(hj¦hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjŒubhŒ6 demonstrates HTE API usage for both IRQ and GPIO GTE.”…””}”(hjŒhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K,hj[hžhubeh}”(h]”Œ'lic-legacy-interrupt-controller-irq-gte”ah ]”h"]”Œ)lic (legacy interrupt controller) irq gte”ah$]”h&]”uh1h´hh¶hžhhŸh³h K#ubeh}”(h]”Œhte-kernel-provider-driver”ah ]”h"]”Œhte kernel provider driver”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”}”(jËjÈhïhìjXjUjÃjÀuŒ nametypes”}”(jˉhï‰jX‰jÉuh}”(jÈh¶hìhÉjUhòjÀj[uŒ 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.