linux/drivers/clk/clk-fixed-rate_test.c

// SPDX-License-Identifier: GPL-2.0
/*
 * KUnit test for clk fixed rate basic type
 */
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/completion.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include <kunit/clk.h>
#include <kunit/of.h>
#include <kunit/platform_device.h>
#include <kunit/resource.h>
#include <kunit/test.h>

#include "clk-fixed-rate_test.h"

/**
 * struct clk_hw_fixed_rate_kunit_params - Parameters to pass to __clk_hw_register_fixed_rate()
 * @dev: device registering clk
 * @np: device_node of device registering clk
 * @name: name of clk
 * @parent_name: parent name of clk
 * @parent_hw: clk_hw pointer to parent of clk
 * @parent_data: parent_data describing parent of clk
 * @flags: clk framework flags
 * @fixed_rate: frequency of clk
 * @fixed_accuracy: accuracy of clk
 * @clk_fixed_flags: fixed rate specific clk flags
 */
struct clk_hw_fixed_rate_kunit_params {};

static int
clk_hw_register_fixed_rate_kunit_init(struct kunit_resource *res, void *context)
{}

static void clk_hw_register_fixed_rate_kunit_exit(struct kunit_resource *res)
{}

/**
 * clk_hw_register_fixed_rate_kunit() - Test managed __clk_hw_register_fixed_rate()
 * @test: The test context
 * @params: Arguments to __clk_hw_register_fixed_rate()
 *
 * Return: Registered fixed rate clk_hw or ERR_PTR on failure
 */
static struct clk_hw *
clk_hw_register_fixed_rate_kunit(struct kunit *test,
				 struct clk_hw_fixed_rate_kunit_params *params)
{}

/**
 * clk_hw_unregister_fixed_rate_kunit() - Test managed clk_hw_unregister_fixed_rate()
 * @test: The test context
 * @hw: fixed rate clk to unregister upon test completion
 *
 * Automatically unregister @hw when @test is complete via
 * clk_hw_unregister_fixed_rate().
 *
 * Return: 0 on success or negative errno on failure
 */
static int clk_hw_unregister_fixed_rate_kunit(struct kunit *test, struct clk_hw *hw)
{}

/*
 * Test that clk_get_rate() on a fixed rate clk registered with
 * clk_hw_register_fixed_rate() gets the proper frequency.
 */
static void clk_fixed_rate_rate_test(struct kunit *test)
{}

/*
 * Test that clk_get_accuracy() on a fixed rate clk registered via
 * clk_hw_register_fixed_rate_with_accuracy() gets the proper accuracy.
 */
static void clk_fixed_rate_accuracy_test(struct kunit *test)
{}

/* Test suite for a fixed rate clk without any parent */
static struct kunit_case clk_fixed_rate_test_cases[] =;

static struct kunit_suite clk_fixed_rate_suite =;

/*
 * Test that clk_get_parent() on a fixed rate clk gets the proper parent.
 */
static void clk_fixed_rate_parent_test(struct kunit *test)
{}

/*
 * Test that clk_get_rate() on a fixed rate clk ignores the parent rate.
 */
static void clk_fixed_rate_parent_rate_test(struct kunit *test)
{}

/*
 * Test that clk_get_accuracy() on a fixed rate clk ignores the parent accuracy.
 */
static void clk_fixed_rate_parent_accuracy_test(struct kunit *test)
{}

/* Test suite for a fixed rate clk with a parent */
static struct kunit_case clk_fixed_rate_parent_test_cases[] =;

static struct kunit_suite clk_fixed_rate_parent_suite =;

struct clk_fixed_rate_of_test_context {};

static inline struct clk_fixed_rate_of_test_context *
pdev_to_clk_fixed_rate_of_test_context(struct platform_device *pdev)
{}

/*
 * Test that of_fixed_clk_setup() registers a fixed rate clk with the proper
 * rate.
 */
static void clk_fixed_rate_of_probe_test(struct kunit *test)
{}

/*
 * Test that of_fixed_clk_setup() registers a fixed rate clk with the proper
 * accuracy.
 */
static void clk_fixed_rate_of_accuracy_test(struct kunit *test)
{}

static struct kunit_case clk_fixed_rate_of_cases[] =;

static int clk_fixed_rate_of_test_probe(struct platform_device *pdev)
{}

static int clk_fixed_rate_of_init(struct kunit *test)
{}

static struct kunit_suite clk_fixed_rate_of_suite =;

kunit_test_suites();
MODULE_LICENSE();
MODULE_DESCRIPTION();