sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/dev-tools/kunit/api/ofmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/dev-tools/kunit/api/ofmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/dev-tools/kunit/api/ofmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/dev-tools/kunit/api/ofmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/dev-tools/kunit/api/ofmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/pt_BR/dev-tools/kunit/api/ofmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/dev-tools/kunit/api/ofmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of.rsthKubhsection)}(hhh](htitle)}(hDevice Tree (OF) APIh]hDevice Tree (OF) API}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hLThe KUnit device tree API is used to test device tree (of_*) dependent code.h]hLThe KUnit device tree API is used to test device tree (of_*) dependent code.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single%__of_overlay_apply_kunit (C function)c.__of_overlay_apply_kunithNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(h[int __of_overlay_apply_kunit (struct kunit *test, u8 *overlay_begin, const u8 *overlay_end)h]hdesc_signature_line)}(hZint __of_overlay_apply_kunit(struct kunit *test, u8 *overlay_begin, const u8 *overlay_end)h](hdesc_sig_keyword_type)}(hinth]hint}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhj hhhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK(ubhdesc_sig_space)}(h h]h }(hj#hhhNhNubah}(h]h ]wah"]h$]h&]uh1j!hj hhhj hK(ubh desc_name)}(h__of_overlay_apply_kunith]h desc_sig_name)}(h__of_overlay_apply_kunith]h__of_overlay_apply_kunit}(hj:hhhNhNubah}(h]h ]nah"]h$]h&]uh1j8hj4ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j2hj hhhj hK(ubhdesc_parameterlist)}(h>(struct kunit *test, u8 *overlay_begin, const u8 *overlay_end)h](hdesc_parameter)}(hstruct kunit *testh](hdesc_sig_keyword)}(hstructh]hstruct}(hj_hhhNhNubah}(h]h ]kah"]h$]h&]uh1j]hjYubj")}(h h]h }(hjnhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjYubh)}(hhh]j9)}(hkunith]hkunit}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj|ubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jj<sbc.__of_overlay_apply_kunitasbuh1hhjYubj")}(h h]h }(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjYubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjYubj9)}(htesth]htest}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjYubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjSubjX)}(hu8 *overlay_beginh](h)}(hhh]j9)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.__of_overlay_apply_kunitasbuh1hhjubj")}(h h]h }(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj9)}(h overlay_beginh]h overlay_begin}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjSubjX)}(hconst u8 *overlay_endh](j^)}(hconsth]hconst}(hj5hhhNhNubah}(h]h ]jjah"]h$]h&]uh1j]hj1ubj")}(h h]h }(hjChhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj1ubh)}(hhh]j9)}(hu8h]hu8}(hjThhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjQubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjVmodnameN classnameNjj)}j]jc.__of_overlay_apply_kunitasbuh1hhj1ubj")}(h h]h }(hjrhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj1ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj9)}(h overlay_endh]h overlay_end}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjSubeh}(h]h ]h"]h$]h&]hhuh1jQhj hhhj hK(ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1j sphinx_line_type declaratorhjhhhj hK(ubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj hK(hjhhubh desc_content)}(hhh]h)}(h+Test managed of_overlay_fdt_apply() varianth]h+Test managed of_overlay_fdt_apply() variant}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK(hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj hK(ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1hhhhhhNhNubh container)}(hX**Parameters** ``struct kunit *test`` test context ``u8 *overlay_begin`` start address of overlay to apply ``const u8 *overlay_end`` end address of overlay to apply **Description** This is mostly internal API. See of_overlay_apply_kunit() for the wrapper that makes this easier to use. Similar to of_overlay_fdt_apply(), except the overlay is managed by the test case and is automatically removed with of_overlay_remove() after the test case concludes. **Return** 0 on success, negative errno on failureh](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK,hjubhdefinition_list)}(hhh](hdefinition_list_item)}(h$``struct kunit *test`` test context h](hterm)}(h``struct kunit *test``h]hliteral)}(hjh]hstruct kunit *test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK)hj ubh definition)}(hhh]h)}(h test contexth]h test context}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hK)hj,ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhj)hK)hjubj )}(h8``u8 *overlay_begin`` start address of overlay to apply h](j)}(h``u8 *overlay_begin``h]j)}(hjOh]hu8 *overlay_begin}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK*hjIubj+)}(hhh]h)}(h!start address of overlay to applyh]h!start address of overlay to apply}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhK*hjeubah}(h]h ]h"]h$]h&]uh1j*hjIubeh}(h]h ]h"]h$]h&]uh1jhjdhK*hjubj )}(h:``const u8 *overlay_end`` end address of overlay to apply h](j)}(h``const u8 *overlay_end``h]j)}(hjh]hconst u8 *overlay_end}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK+hjubj+)}(hhh]h)}(hend address of overlay to applyh]hend address of overlay to apply}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK+hjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhK+hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK-hjubh)}(hhThis is mostly internal API. See of_overlay_apply_kunit() for the wrapper that makes this easier to use.h]hhThis is mostly internal API. See of_overlay_apply_kunit() for the wrapper that makes this easier to use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK,hjubh)}(hSimilar to of_overlay_fdt_apply(), except the overlay is managed by the test case and is automatically removed with of_overlay_remove() after the test case concludes.h]hSimilar to of_overlay_fdt_apply(), except the overlay is managed by the test case and is automatically removed with of_overlay_remove() after the test case concludes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK/hjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK3hjubh)}(h'0 on success, negative errno on failureh]h'0 on success, negative errno on failure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK4hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h of_overlay_apply_kunit (C macro)c.of_overlay_apply_kunithNtauh1hhhhhhNhNubh)}(hhh](j)}(hof_overlay_apply_kunith]j )}(hof_overlay_apply_kunith]j3)}(hof_overlay_apply_kunith]j9)}(hj8h]hof_overlay_apply_kunit}(hjBhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj>ubah}(h]h ](jLjMeh"]h$]h&]hhuh1j2hj:hhhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKIubah}(h]h ]h"]h$]h&]hhjuh1j jjhj6hhhjUhKIubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1jhjUhKIhj3hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj3hhhjUhKIubeh}(h]h ](jmacroeh"]h$]h&]jjjjnjjnjjjuh1hhhhhhNhNubh)}(h/``of_overlay_apply_kunit (test, overlay_name)``h]j)}(hjth]h+of_overlay_apply_kunit (test, overlay_name)}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKKhhhhubh block_quote)}(h:Test managed of_overlay_fdt_apply() for built-in overlays h]h)}(h9Test managed of_overlay_fdt_apply() for built-in overlaysh]h9Test managed of_overlay_fdt_apply() for built-in overlays}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKIhjubah}(h]h ]h"]h$]h&]uh1jhjhKIhhhhubj)}(hX **Parameters** ``test`` test context ``overlay_name`` name of overlay to apply **Description** This macro is used to apply a device tree overlay built with the cmd_dt_S_dtbo rule in scripts/Makefile.lib that has been compiled into the kernel image or KUnit test module. The overlay is automatically removed when the test is finished. Unit tests that need device tree nodes should compile an overlay file with **overlay_name**\.dtbo.o in their Makefile along with their unit test and then load the overlay during their test. The **overlay_name** matches the filename of the overlay without the dtbo filename extension. If CONFIG_OF_OVERLAY is not enabled, the **test** will be skipped. In the Makefile .. code-block:: none obj-$(CONFIG_OF_OVERLAY_KUNIT_TEST) += overlay_test.o kunit_overlay_test.dtbo.o In the test .. code-block:: c static void of_overlay_kunit_of_overlay_apply(struct kunit *test) { struct device_node *np; KUNIT_ASSERT_EQ(test, 0, of_overlay_apply_kunit(test, kunit_overlay_test)); np = of_find_node_by_name(NULL, "test-kunit"); KUNIT_EXPECT_NOT_ERR_OR_NULL(test, np); of_node_put(np); } **Return** 0 on success, negative errno on failure.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKMhjubj)}(hhh](j )}(h``test`` test context h](j)}(h``test``h]j)}(hjh]htest}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKJhjubj+)}(hhh]h)}(h test contexth]h test context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKJhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhKJhjubj )}(h*``overlay_name`` name of overlay to apply h](j)}(h``overlay_name``h]j)}(hjh]h overlay_name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKKhjubj+)}(hhh]h)}(hname of overlay to applyh]hname of overlay to apply}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKKhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhKKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj>h]h Description}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKMhjubh)}(hThis macro is used to apply a device tree overlay built with the cmd_dt_S_dtbo rule in scripts/Makefile.lib that has been compiled into the kernel image or KUnit test module. The overlay is automatically removed when the test is finished.h]hThis macro is used to apply a device tree overlay built with the cmd_dt_S_dtbo rule in scripts/Makefile.lib that has been compiled into the kernel image or KUnit test module. The overlay is automatically removed when the test is finished.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKLhjubh)}(hX^Unit tests that need device tree nodes should compile an overlay file with **overlay_name**\.dtbo.o in their Makefile along with their unit test and then load the overlay during their test. The **overlay_name** matches the filename of the overlay without the dtbo filename extension. If CONFIG_OF_OVERLAY is not enabled, the **test** will be skipped.h](hKUnit tests that need device tree nodes should compile an overlay file with }(hjchhhNhNubj)}(h**overlay_name**h]h overlay_name}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubhg.dtbo.o in their Makefile along with their unit test and then load the overlay during their test. The }(hjchhhNhNubj)}(h**overlay_name**h]h overlay_name}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubhs matches the filename of the overlay without the dtbo filename extension. If CONFIG_OF_OVERLAY is not enabled, the }(hjchhhNhNubj)}(h**test**h]htest}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubh will be skipped.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKQhjubh)}(hIn the Makefileh]hIn the Makefile}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKWhjubh literal_block)}(hOobj-$(CONFIG_OF_OVERLAY_KUNIT_TEST) += overlay_test.o kunit_overlay_test.dtbo.oh]hOobj-$(CONFIG_OF_OVERLAY_KUNIT_TEST) += overlay_test.o kunit_overlay_test.dtbo.o}hjsbah}(h]h ]h"]h$]h&]hhƌforcelanguagenonehighlight_args}uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKYhjubh)}(h In the testh]h In the test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK]hjubj)}(hXSstatic void of_overlay_kunit_of_overlay_apply(struct kunit *test) { struct device_node *np; KUNIT_ASSERT_EQ(test, 0, of_overlay_apply_kunit(test, kunit_overlay_test)); np = of_find_node_by_name(NULL, "test-kunit"); KUNIT_EXPECT_NOT_ERR_OR_NULL(test, np); of_node_put(np); }h]hXSstatic void of_overlay_kunit_of_overlay_apply(struct kunit *test) { struct device_node *np; KUNIT_ASSERT_EQ(test, 0, of_overlay_apply_kunit(test, kunit_overlay_test)); np = of_find_node_by_name(NULL, "test-kunit"); KUNIT_EXPECT_NOT_ERR_OR_NULL(test, np); of_node_put(np); }}hjsbah}(h]h ]h"]h$]h&]hhjjjj}uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK_hjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKmhjubh)}(h(0 on success, negative errno on failure.h]h(0 on success, negative errno on failure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKnhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hof_root_kunit_skip (C function)c.of_root_kunit_skiphNtauh1hhhhhhNhNubh)}(hhh](j)}(h,void of_root_kunit_skip (struct kunit *test)h]j )}(h+void of_root_kunit_skip(struct kunit *test)h](j)}(hvoidh]hvoid}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKubj")}(h h]h }(hjBhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj/hhhjAhKubj3)}(hof_root_kunit_skiph]j9)}(hof_root_kunit_skiph]hof_root_kunit_skip}(hjThhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjPubah}(h]h ](jLjMeh"]h$]h&]hhuh1j2hj/hhhjAhKubjR)}(h(struct kunit *test)h]jX)}(hstruct kunit *testh](j^)}(hjah]hstruct}(hjphhhNhNubah}(h]h ]jjah"]h$]h&]uh1j]hjlubj")}(h h]h }(hj}hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjlubh)}(hhh]j9)}(hkunith]hkunit}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjVsbc.of_root_kunit_skipasbuh1hhjlubj")}(h h]h }(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjlubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj9)}(htesth]htest}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjlubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjhubah}(h]h ]h"]h$]h&]hhuh1jQhj/hhhjAhKubeh}(h]h ]h"]h$]h&]hhjuh1j jjhj+hhhjAhKubah}(h]j&ah ](jjeh"]h$]h&]jj)jhuh1jhjAhKhj(hhubj)}(hhh]h)}(h*Skip test if the root node isn't populatedh]h,Skip test if the root node isn’t populated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhj(hhhjAhKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1hhhhhhNhNubj)}(hV**Parameters** ``struct kunit *test`` test to skip if the root node isn't populatedh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKhjubj)}(hhh]j )}(hD``struct kunit *test`` test to skip if the root node isn't populatedh](j)}(h``struct kunit *test``h]j)}(hj4h]hstruct kunit *test}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKhj.ubj+)}(hhh]h)}(h-test to skip if the root node isn't populatedh]h/test to skip if the root node isn’t populated}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKhjJubah}(h]h ]h"]h$]h&]uh1j*hj.ubeh}(h]h ]h"]h$]h&]uh1jhjIhKhj+ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h'of_overlay_fdt_apply_kunit (C function)c.of_overlay_fdt_apply_kunithNtauh1hhhhhhNhNubh)}(hhh](j)}(hjint of_overlay_fdt_apply_kunit (struct kunit *test, void *overlay_fdt, u32 overlay_fdt_size, int *ovcs_id)h]j )}(hiint of_overlay_fdt_apply_kunit(struct kunit *test, void *overlay_fdt, u32 overlay_fdt_size, int *ovcs_id)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK#ubj")}(h h]h }(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjhhhjhK#ubj3)}(hof_overlay_fdt_apply_kunith]j9)}(hof_overlay_fdt_apply_kunith]hof_overlay_fdt_apply_kunit}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j2hjhhhjhK#ubjR)}(hK(struct kunit *test, void *overlay_fdt, u32 overlay_fdt_size, int *ovcs_id)h](jX)}(hstruct kunit *testh](j^)}(hjah]hstruct}(hjhhhNhNubah}(h]h ]jjah"]h$]h&]uh1j]hjubj")}(h h]h }(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubh)}(hhh]j9)}(hkunith]hkunit}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.of_overlay_fdt_apply_kunitasbuh1hhjubj")}(h h]h }(hj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj9)}(htesth]htest}(hj$hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjubjX)}(hvoid *overlay_fdth](j)}(hvoidh]hvoid}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubj")}(h h]h }(hjKhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj9ubj)}(hjh]h*}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubj9)}(h overlay_fdth]h overlay_fdt}(hjfhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj9ubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjubjX)}(hu32 overlay_fdt_sizeh](h)}(hhh]j9)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.of_overlay_fdt_apply_kunitasbuh1hhj{ubj")}(h h]h }(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj{ubj9)}(hoverlay_fdt_sizeh]hoverlay_fdt_size}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj{ubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjubjX)}(h int *ovcs_idh](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj")}(h h]h }(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj9)}(hovcs_idh]hovcs_id}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhjubeh}(h]h ]h"]h$]h&]hhuh1jQhjhhhjhK#ubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjhhhjhK#ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhK#hjhhubj)}(hhh]h)}(h#Test managed of_overlay_fdt_apply()h]h#Test managed of_overlay_fdt_apply()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK#hj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK#ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj2 jj2 jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct kunit *test`` test context ``void *overlay_fdt`` device tree overlay to apply ``u32 overlay_fdt_size`` size in bytes of **overlay_fdt** ``int *ovcs_id`` identifier of overlay, used to remove the overlay **Description** Just like of_overlay_fdt_apply(), except the overlay is managed by the test case and is automatically removed with of_overlay_remove() after the test case concludes. **Return** 0 on success, negative errno on failureh](h)}(h**Parameters**h]j)}(hj< h]h Parameters}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj: ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK'hj6 ubj)}(hhh](j )}(h$``struct kunit *test`` test context h](j)}(h``struct kunit *test``h]j)}(hj[ h]hstruct kunit *test}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK$hjU ubj+)}(hhh]h)}(h test contexth]h test context}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp hK$hjq ubah}(h]h ]h"]h$]h&]uh1j*hjU ubeh}(h]h ]h"]h$]h&]uh1jhjp hK$hjR ubj )}(h3``void *overlay_fdt`` device tree overlay to apply h](j)}(h``void *overlay_fdt``h]j)}(hj h]hvoid *overlay_fdt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK%hj ubj+)}(hhh]h)}(hdevice tree overlay to applyh]hdevice tree overlay to apply}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK%hj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK%hjR ubj )}(h:``u32 overlay_fdt_size`` size in bytes of **overlay_fdt** h](j)}(h``u32 overlay_fdt_size``h]j)}(hj h]hu32 overlay_fdt_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK&hj ubj+)}(hhh]h)}(h size in bytes of **overlay_fdt**h](hsize in bytes of }(hj hhhNhNubj)}(h**overlay_fdt**h]h overlay_fdt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhj hK&hj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK&hjR ubj )}(hC``int *ovcs_id`` identifier of overlay, used to remove the overlay h](j)}(h``int *ovcs_id``h]j)}(hj h]h int *ovcs_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK'hj ubj+)}(hhh]h)}(h1identifier of overlay, used to remove the overlayh]h1identifier of overlay, used to remove the overlay}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj) hK'hj* ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhj) hK'hjR ubeh}(h]h ]h"]h$]h&]uh1jhj6 ubh)}(h**Description**h]j)}(hjO h]h Description}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK)hj6 ubh)}(hJust like of_overlay_fdt_apply(), except the overlay is managed by the test case and is automatically removed with of_overlay_remove() after the test case concludes.h]hJust like of_overlay_fdt_apply(), except the overlay is managed by the test case and is automatically removed with of_overlay_remove() after the test case concludes.}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK(hj6 ubh)}(h **Return**h]j)}(hjv h]hReturn}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjt ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK,hj6 ubh)}(h'0 on success, negative errno on failureh]h'0 on success, negative errno on failure}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chK-hj6 ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hof_node_put_kunit (C function)c.of_node_put_kunithNtauh1hhhhhhNhNubh)}(hhh](j)}(hEvoid of_node_put_kunit (struct kunit *test, struct device_node *node)h]j )}(hDvoid of_node_put_kunit(struct kunit *test, struct device_node *node)h](j)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKLubj")}(h h]h }(hj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj hhhj hKLubj3)}(hof_node_put_kunith]j9)}(hof_node_put_kunith]hof_node_put_kunit}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubah}(h]h ](jLjMeh"]h$]h&]hhuh1j2hj hhhj hKLubjR)}(h.(struct kunit *test, struct device_node *node)h](jX)}(hstruct kunit *testh](j^)}(hjah]hstruct}(hj hhhNhNubah}(h]h ]jjah"]h$]h&]uh1j]hj ubj")}(h h]h }(hj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj ubh)}(hhh]j9)}(hkunith]hkunit}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jj sbc.of_node_put_kunitasbuh1hhj ubj")}(h h]h }(hj6 hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj ubj)}(hjh]h*}(hjD hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj9)}(htesth]htest}(hjQ hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhj ubjX)}(hstruct device_node *nodeh](j^)}(hjah]hstruct}(hjj hhhNhNubah}(h]h ]jjah"]h$]h&]uh1j]hjf ubj")}(h h]h }(hjw hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjf ubh)}(hhh]j9)}(h device_nodeh]h device_node}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j2 c.of_node_put_kunitasbuh1hhjf ubj")}(h h]h }(hj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjf ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf ubj9)}(hnodeh]hnode}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjf ubeh}(h]h ]h"]h$]h&]noemphhhuh1jWhj ubeh}(h]h ]h"]h$]h&]hhuh1jQhj hhhj hKLubeh}(h]h ]h"]h$]h&]hhjuh1j jjhj hhhj hKLubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj hKLhj hhubj)}(hhh]h)}(hTest managed of_node_put()h]hTest managed of_node_put()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKLhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKLubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct kunit *test`` test context ``struct device_node *node`` node to pass to `of_node_put()` **Description** Just like of_node_put(), except the node is managed by the test case and is automatically put with of_node_put() after the test case concludes.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKPhj ubj)}(hhh](j )}(h$``struct kunit *test`` test context h](j)}(h``struct kunit *test``h]j)}(hj, h]hstruct kunit *test}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj* ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKMhj& ubj+)}(hhh]h)}(h test contexth]h test context}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA hKMhjB ubah}(h]h ]h"]h$]h&]uh1j*hj& ubeh}(h]h ]h"]h$]h&]uh1jhjA hKMhj# ubj )}(h=``struct device_node *node`` node to pass to `of_node_put()` h](j)}(h``struct device_node *node``h]j)}(hje h]hstruct device_node *node}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjc ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKNhj_ ubj+)}(hhh]h)}(hnode to pass to `of_node_put()`h](hnode to pass to }(hj~ hhhNhNubhtitle_reference)}(h`of_node_put()`h]h of_node_put()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj~ ubeh}(h]h ]h"]h$]h&]uh1hhjz hKNhj{ ubah}(h]h ]h"]h$]h&]uh1j*hj_ ubeh}(h]h ]h"]h$]h&]uh1jhjz hKNhj# ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKPhj ubh)}(hJust like of_node_put(), except the node is managed by the test case and is automatically put with of_node_put() after the test case concludes.h]hJust like of_node_put(), except the node is managed by the test case and is automatically put with of_node_put() after the test case concludes.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKOhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubeh}(h]device-tree-of-apiah ]h"]device tree (of) apiah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN 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_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _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}nameids}j j s nametypes}j sh}(j hhjj1j6j&j+jjj j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.