zephyr/tests/kernel/device/src/dummy_driver.c
Gerard Marull-Paretas 618609dc2c tests: kernel: device: remove PM related tests
The PM subsystem is tested in tests/subsys/pm, the removed tests were
not relevant for devices. The test_build_suspend_device_list test has
been renamed to test_device_list since the API is not strictly related
to PM (and does not depend on it).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-02 10:53:39 +01:00

44 lines
756 B
C

/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <device.h>
#define DUMMY_DRIVER_NAME "dummy_driver"
typedef int (*dummy_api_configure_t)(const struct device *dev,
uint32_t dev_config);
struct dummy_driver_api {
dummy_api_configure_t configure;
};
static int dummy_configure(const struct device *dev, uint32_t config)
{
return 0;
}
static const struct dummy_driver_api funcs = {
.configure = dummy_configure,
};
int dummy_init(const struct device *dev)
{
return 0;
}
/**
* @cond INTERNAL_HIDDEN
*/
DEVICE_DEFINE(dummy_driver, DUMMY_DRIVER_NAME, dummy_init, NULL, NULL, NULL,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &funcs);
/**
* @endcond
*/