Lines Matching full:region
3 * KUnit test for the FPGA Region
14 #include <linux/fpga/fpga-region.h>
32 struct fpga_region *region; member
64 * of the Region.
90 static int fake_region_get_bridges(struct fpga_region *region) in fake_region_get_bridges() argument
92 struct fpga_bridge *bridge = region->priv; in fake_region_get_bridges()
94 return fpga_bridge_get_to_list(bridge->dev.parent, region->info, ®ion->bridge_list); in fake_region_get_bridges()
105 struct fpga_region *region; in fpga_region_test_class_find() local
107 region = fpga_region_class_find(NULL, ctx->region_dev, fake_region_match); in fpga_region_test_class_find()
108 KUNIT_EXPECT_PTR_EQ(test, region, ctx->region); in fpga_region_test_class_find()
110 put_device(®ion->dev); in fpga_region_test_class_find()
114 * FPGA Region programming test. The Region must call get_bridges() to get
133 ctx->region->info = img_info; in fpga_region_test_program_fpga()
134 ret = fpga_region_program_fpga(ctx->region); in fpga_region_test_program_fpga()
140 fpga_bridges_put(&ctx->region->bridge_list); in fpga_region_test_program_fpga()
142 ret = fpga_region_program_fpga(ctx->region); in fpga_region_test_program_fpga()
148 fpga_bridges_put(&ctx->region->bridge_list); in fpga_region_test_program_fpga()
154 * Region for getting and controlling bridges are tested (with a list of
185 ctx->region_dev = kunit_device_register(test, "fpga-region-test-dev"); in fpga_region_test_init()
192 ctx->region = fpga_region_register_full(ctx->region_dev, ®ion_info); in fpga_region_test_init()
193 KUNIT_ASSERT_FALSE(test, IS_ERR_OR_NULL(ctx->region)); in fpga_region_test_init()
195 ret = kunit_add_action_or_reset(test, fpga_region_unregister_wrapper, ctx->region); in fpga_region_test_init()