ĥ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]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}(hhhhhNhNubah}(h]h ]ktah"]h$]h&]uh1hhhhhhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK(ubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1j hhhhhj 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&]uh1j$hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhhhhhj 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}(hjKhhhNhNubah}(h]h ]kah"]h$]h&]uh1jIhjEubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjEubh)}(hhh]j%)}(hkunith]hkunit}(hjkhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jj(sbc.__of_overlay_apply_kunitasbuh1hhjEubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjEubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjEubj%)}(htesth]htest}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjEubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj?ubjD)}(hu8 *overlay_beginh](h)}(hhh]j%)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.__of_overlay_apply_kunitasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(h overlay_beginh]h overlay_begin}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj?ubjD)}(hconst u8 *overlay_endh](jJ)}(hconsth]hconst}(hj!hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(hu8h]hu8}(hj@hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj=ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjBmodnameN classnameNjj)}j]jc.__of_overlay_apply_kunitasbuh1hhjubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(h overlay_endh]h overlay_end}(hjyhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj?ubeh}(h]h ]h"]h$]h&]hhuh1j=hhhhhj hK(ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1hsphinx_line_type declaratorhhhhhj hK(ubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1hhj hK(hhhhubh 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&]uh1jhhhhhj 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)hjubh definition)}(hhh]h)}(h test contexth]h test context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK)hjubj)}(h8``u8 *overlay_begin`` start address of overlay to apply h](j)}(h``u8 *overlay_begin``h]j)}(hj;h]hu8 *overlay_begin}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK*hj5ubj)}(hhh]h)}(h!start address of overlay to applyh]h!start address of overlay to apply}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhK*hjQubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhjPhK*hjubj)}(h:``const u8 *overlay_end`` end address of overlay to apply h](j)}(h``const u8 *overlay_end``h]j)}(hjth]hconst u8 *overlay_end}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhK+hjnubj)}(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&]uh1jhjnubeh}(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.hhK0hjubh)}(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.hhK4hjubh)}(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](h)}(hof_overlay_apply_kunith]h)}(hof_overlay_apply_kunith]j)}(hof_overlay_apply_kunith]j%)}(hj$h]hof_overlay_apply_kunit}(hj.hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj*ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj&hhhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKIubah}(h]h ]h"]h$]h&]hhjuh1hjjhj"hhhjAhKIubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1hhjAhKIhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjAhKIubeh}(h]h ](jmacroeh"]h$]h&]jjjjZjjZjjjuh1hhhhhhNhNubh)}(h/``of_overlay_apply_kunit (test, overlay_name)``h]j)}(hj`h]h+of_overlay_apply_kunit (test, overlay_name)}(hjbhhhNhNubah}(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.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}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKIhjxubah}(h]h ]h"]h$]h&]uh1jvhjhKIhhhhubj)}(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&]uh1jhjubeh}(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&]uh1jhjubeh}(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.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKMhjubh)}(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 }(hjOhhhNhNubj)}(h**overlay_name**h]h overlay_name}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubhg.dtbo.o in their Makefile along with their unit test and then load the overlay during their test. The }(hjOhhhNhNubj)}(h**overlay_name**h]h overlay_name}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubhs matches the filename of the overlay without the dtbo filename extension. If CONFIG_OF_OVERLAY is not enabled, the }(hjOhhhNhNubj)}(h**test**h]htest}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubh will be skipped.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKRhjubh)}(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.hhKXhjubh 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&]hhforcelanguagenonehighlight_args}uh1jhX/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:9: ./include/kunit/of.hhKZhjubh)}(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.hhKnhjubh)}(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](h)}(h,void of_root_kunit_skip (struct kunit *test)h]h)}(h+void of_root_kunit_skip(struct kunit *test)h](h)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1hhjhhhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhj-hKubj)}(hof_root_kunit_skiph]j%)}(hof_root_kunit_skiph]hof_root_kunit_skip}(hj@hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj<ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhjhhhj-hKubj>)}(h(struct kunit *test)h]jD)}(hstruct kunit *testh](jJ)}(hjMh]hstruct}(hj\hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjXubj)}(h h]h }(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjXubh)}(hhh]j%)}(hkunith]hkunit}(hjzhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjwubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj|modnameN classnameNjj)}j]j)}jjBsbc.of_root_kunit_skipasbuh1hhjXubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjXubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj%)}(htesth]htest}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjXubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjTubah}(h]h ]h"]h$]h&]hhuh1j=hjhhhj-hKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhj-hKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1hhj-hKhjhhubj)}(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&]uh1jhjhhhj-hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1hhhhhhNhNubj)}(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)}(hj h]hstruct kunit *test}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKhjubj)}(hhh]h)}(h-test to skip if the root node isn't populatedh]h/test to skip if the root node isn’t populated}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKhj6ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj5hKhjubah}(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](h)}(hjint of_overlay_fdt_apply_kunit (struct kunit *test, void *overlay_fdt, u32 overlay_fdt_size, int *ovcs_id)h]h)}(hiint of_overlay_fdt_apply_kunit(struct kunit *test, void *overlay_fdt, u32 overlay_fdt_size, int *ovcs_id)h](h)}(hinth]hint}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1hhjvhhhd/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 ]jah"]h$]h&]uh1j hjvhhhjhK"ubj)}(hof_overlay_fdt_apply_kunith]j%)}(hof_overlay_fdt_apply_kunith]hof_overlay_fdt_apply_kunit}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhjvhhhjhK"ubj>)}(hK(struct kunit *test, void *overlay_fdt, u32 overlay_fdt_size, int *ovcs_id)h](jD)}(hstruct kunit *testh](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(hkunith]hkunit}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.of_overlay_fdt_apply_kunitasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(htesth]htest}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hvoid *overlay_fdth](h)}(hvoidh]hvoid}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1hhj%ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj%ubj)}(hjh]h*}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj%)}(h overlay_fdth]h overlay_fdt}(hjRhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hu32 overlay_fdt_sizeh](h)}(hhh]j%)}(hu32h]hu32}(hjnhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjkubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjpmodnameN classnameNjj)}j]jc.of_overlay_fdt_apply_kunitasbuh1hhjgubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjgubj%)}(hoverlay_fdt_sizeh]hoverlay_fdt_size}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjgubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(h int *ovcs_idh](h)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hovcs_idh]hovcs_id}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubeh}(h]h ]h"]h$]h&]hhuh1j=hjvhhhjhK"ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjrhhhjhK"ubah}(h]jmah ](jjeh"]h$]h&]jj)jhuh1hhjhK"hjohhubj)}(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&]uh1jhjohhhjhK"ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj 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&hj" ubj)}(hhh](j)}(h$``struct kunit *test`` test context h](j)}(h``struct kunit *test``h]j)}(hjG h]hstruct kunit *test}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE 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#hjA ubj)}(hhh]h)}(h test contexth]h test context}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ hK#hj] ubah}(h]h ]h"]h$]h&]uh1jhjA ubeh}(h]h ]h"]h$]h&]uh1jhj\ hK#hj> 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$hjz 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&]uh1jhjz ubeh}(h]h ]h"]h$]h&]uh1jhj hK$hj> 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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK%hj> 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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK&hj> ubeh}(h]h ]h"]h$]h&]uh1jhj" ubh)}(h**Description**h]j)}(hj; h]h Description}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9 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(hj" 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.}(hjQ 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" ubh)}(h **Return**h]j)}(hjb h]hReturn}(hjd 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,hj" ubh)}(h'0 on success, negative errno on failureh]h'0 on success, negative errno on failure}(hjx 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" 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](h)}(hEvoid of_node_put_kunit (struct kunit *test, struct device_node *node)h]h)}(hDvoid of_node_put_kunit(struct kunit *test, struct device_node *node)h](h)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1hhj hhhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj hhhj hKKubj)}(hof_node_put_kunith]j%)}(hof_node_put_kunith]hof_node_put_kunit}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj hhhj hKKubj>)}(h.(struct kunit *test, struct device_node *node)h](jD)}(hstruct kunit *testh](jJ)}(hjMh]hstruct}(hj hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubh)}(hhh]j%)}(hkunith]hkunit}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jj sbc.of_node_put_kunitasbuh1hhj ubj)}(h h]h }(hj" hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubj)}(hjh]h*}(hj0 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj%)}(htesth]htest}(hj= hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj ubjD)}(hstruct device_node *nodeh](jJ)}(hjMh]hstruct}(hjV hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjR ubj)}(h h]h }(hjc hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjR ubh)}(hhh]j%)}(h device_nodeh]h device_node}(hjt hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjq ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjv modnameN classnameNjj)}j]j c.of_node_put_kunitasbuh1hhjR ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjR ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR ubj%)}(hnodeh]hnode}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjR ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj ubeh}(h]h ]h"]h$]h&]hhuh1j=hj hhhj hKKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj hhhj hKKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1hhj hKKhj 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.chKKhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKKubeh}(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.chKOhj 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.chKLhj ubj)}(hhh]h)}(h test contexth]h test context}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj- hKLhj. ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj- hKLhj ubj)}(h=``struct device_node *node`` node to pass to `of_node_put()` h](j)}(h``struct device_node *node``h]j)}(hjQ h]hstruct device_node *node}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/api/of:12: ./drivers/of/of_kunit_helpers.chKMhjK ubj)}(hhh]h)}(hnode to pass to `of_node_put()`h](hnode to pass to }(hjj hhhNhNubhtitle_reference)}(h`of_node_put()`h]h of_node_put()}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jr hjj ubeh}(h]h ]h"]h$]h&]uh1hhjf hKMhjg ubah}(h]h ]h"]h$]h&]uh1jhjK ubeh}(h]h ]h"]h$]h&]uh1jhjf hKMhj 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.chKOhj 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_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}nameids}j j s nametypes}j sh}(j hhhjj"jjjmjrj 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.