1 /*
2 * Copyright (c) 2019 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr.h>
8 #include <device.h>
9
10
11 #define BAD_DRIVER_NAME "bad_driver"
12
13 typedef int (*bad_api_configure_t)(const struct device *dev,
14 uint32_t dev_config);
15
16
17 struct bad_driver_api {
18 bad_api_configure_t configure;
19 };
20
bad_configure(const struct device * dev,uint32_t config)21 static int bad_configure(const struct device *dev, uint32_t config)
22 {
23 return 0;
24 }
25
26 static const struct bad_driver_api funcs = {
27 .configure = bad_configure,
28 };
29
bad_driver_init(const struct device * dev)30 int bad_driver_init(const struct device *dev)
31 {
32 return -EINVAL;
33 }
34
35 /**
36 * @cond INTERNAL_HIDDEN
37 */
38 DEVICE_DEFINE(bad_driver, BAD_DRIVER_NAME, &bad_driver_init,
39 NULL, NULL, NULL, POST_KERNEL,
40 CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &funcs);
41
42 /**
43 * @endcond
44 */
45