1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2018-2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include <mod_mock_psu.h>
9 
10 #include <fwk_element.h>
11 #include <fwk_id.h>
12 #include <fwk_module.h>
13 
14 #include <stdbool.h>
15 
16 static const struct fwk_element element_table[] = {
17     {
18         .name = "DVFS_GROUP0",
19         .data =
20             &(const struct mod_mock_psu_element_cfg){
21                 .async_alarm_id = FWK_ID_NONE_INIT,
22                 .async_alarm_api_id = FWK_ID_NONE_INIT,
23 
24                 .async_response_id = FWK_ID_NONE_INIT,
25                 .async_response_api_id = FWK_ID_NONE_INIT,
26 
27                 .default_enabled = true,
28                 .default_voltage = 100,
29             },
30     },
31     {
32         .name = "DVFS_GROUP1",
33         .data =
34             &(const struct mod_mock_psu_element_cfg){
35                 .async_alarm_id = FWK_ID_NONE_INIT,
36                 .async_alarm_api_id = FWK_ID_NONE_INIT,
37 
38                 .async_response_id = FWK_ID_NONE_INIT,
39                 .async_response_api_id = FWK_ID_NONE_INIT,
40 
41                 .default_enabled = true,
42                 .default_voltage = 100,
43             },
44     },
45     { 0 }
46 };
47 
get_element_table(fwk_id_t module_id)48 static const struct fwk_element *get_element_table(fwk_id_t module_id)
49 {
50     return element_table;
51 }
52 
53 const struct fwk_module_config config_mock_psu = {
54     .elements = FWK_MODULE_DYNAMIC_ELEMENTS(get_element_table),
55 };
56