summaryrefslogtreecommitdiff
path: root/drivers/reset/core-test.c
AgeCommit message (Collapse)Author
12 daysreset: Add KUnit test casesTzung-Bi Shih
Since commit 9035073d0ef1 ("reset: convert reset core to using firmware nodes"), reset suppliers and consumers can be wired up using software nodes without requiring Device Tree or hardware devices. Leverage this to add KUnit test cases for the reset controller framework. The test cases cover the following scenarios: - Basic: Verifies that a consumer can acquire a reset control via fwnode and perform reset, assert, deassert, status, release, and acquire operations. - Use After Unregister: Verifies that after the supplier unregisters the reset_controller_dev while a consumer still holds a reset_control handle, subsequent consumer operations fail safely with -ENODEV. - Concurrent Unregister: Verifies that unregistering the reset_controller_dev concurrently with an in-flight reset operation waits for the active operation to complete before returning. Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>