linux/drivers/base/regmap/regmap-kunit.c

// SPDX-License-Identifier: GPL-2.0
//
// regmap KUnit tests
//
// Copyright 2023 Arm Ltd

#include <kunit/device.h>
#include <kunit/resource.h>
#include <kunit/test.h>
#include "internal.h"

#define BLOCK_TEST_SIZE

KUNIT_DEFINE_ACTION_WRAPPER(regmap_exit_action, regmap_exit, struct regmap *);

struct regmap_test_priv {};

struct regmap_test_param {};

static void get_changed_bytes(void *orig, void *new, size_t size)
{}

static const struct regmap_config test_regmap_config =;

static const char *regcache_type_name(enum regcache_type type)
{}

static const char *regmap_endian_name(enum regmap_endian endian)
{}

static void param_to_desc(const struct regmap_test_param *param, char *desc)
{}

static const struct regmap_test_param regcache_types_list[] =;

KUNIT_ARRAY_PARAM(regcache_types, regcache_types_list, param_to_desc);

static const struct regmap_test_param real_cache_types_only_list[] =;

KUNIT_ARRAY_PARAM(real_cache_types_only, real_cache_types_only_list, param_to_desc);

static const struct regmap_test_param real_cache_types_list[] =;

KUNIT_ARRAY_PARAM(real_cache_types, real_cache_types_list, param_to_desc);

static const struct regmap_test_param sparse_cache_types_list[] =;

KUNIT_ARRAY_PARAM(sparse_cache_types, sparse_cache_types_list, param_to_desc);

static struct regmap *gen_regmap(struct kunit *test,
				 struct regmap_config *config,
				 struct regmap_ram_data **data)
{}

static bool reg_5_false(struct device *dev, unsigned int reg)
{}

static void basic_read_write(struct kunit *test)
{}

static void bulk_write(struct kunit *test)
{}

static void bulk_read(struct kunit *test)
{}

static void multi_write(struct kunit *test)
{}

static void multi_read(struct kunit *test)
{}

static void read_bypassed(struct kunit *test)
{}

static void read_bypassed_volatile(struct kunit *test)
{}

static void write_readonly(struct kunit *test)
{}

static void read_writeonly(struct kunit *test)
{}

static void reg_defaults(struct kunit *test)
{}

static void reg_defaults_read_dev(struct kunit *test)
{}

static void register_patch(struct kunit *test)
{}

static void stride(struct kunit *test)
{}

static struct regmap_range_cfg test_range =;

static bool test_range_window_volatile(struct device *dev, unsigned int reg)
{}

static bool test_range_all_volatile(struct device *dev, unsigned int reg)
{}

static void basic_ranges(struct kunit *test)
{}

/* Try to stress dynamic creation of cache data structures */
static void stress_insert(struct kunit *test)
{}

static void cache_bypass(struct kunit *test)
{}

static void cache_sync_marked_dirty(struct kunit *test)
{}

static void cache_sync_after_cache_only(struct kunit *test)
{}

static void cache_sync_defaults_marked_dirty(struct kunit *test)
{}

static void cache_sync_default_after_cache_only(struct kunit *test)
{}

static void cache_sync_readonly(struct kunit *test)
{}

static void cache_sync_patch(struct kunit *test)
{}

static void cache_drop(struct kunit *test)
{}

static void cache_drop_with_non_contiguous_ranges(struct kunit *test)
{}

static void cache_drop_all_and_sync_marked_dirty(struct kunit *test)
{}

static void cache_drop_all_and_sync_no_defaults(struct kunit *test)
{}

static void cache_drop_all_and_sync_has_defaults(struct kunit *test)
{}

static void cache_present(struct kunit *test)
{}

/* Check that caching the window register works with sync */
static void cache_range_window_reg(struct kunit *test)
{}

static const struct regmap_test_param raw_types_list[] =;

KUNIT_ARRAY_PARAM(raw_test_types, raw_types_list, param_to_desc);

static const struct regmap_test_param raw_cache_types_list[] =;

KUNIT_ARRAY_PARAM(raw_test_cache_types, raw_cache_types_list, param_to_desc);

static const struct regmap_config raw_regmap_config =;

static struct regmap *gen_raw_regmap(struct kunit *test,
				     struct regmap_config *config,
				     struct regmap_ram_data **data)
{}

static void raw_read_defaults_single(struct kunit *test)
{}

static void raw_read_defaults(struct kunit *test)
{}

static void raw_write_read_single(struct kunit *test)
{}

static void raw_write(struct kunit *test)
{}

static bool reg_zero(struct device *dev, unsigned int reg)
{}

static bool ram_reg_zero(struct regmap_ram_data *data, unsigned int reg)
{}

static void raw_noinc_write(struct kunit *test)
{}

static void raw_sync(struct kunit *test)
{}

static void raw_ranges(struct kunit *test)
{}

static struct kunit_case regmap_test_cases[] =;

static int regmap_test_init(struct kunit *test)
{}

static void regmap_test_exit(struct kunit *test)
{}

static struct kunit_suite regmap_test_suite =;
kunit_test_suite();

MODULE_DESCRIPTION();
MODULE_LICENSE();