1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Description:
8  *      SCMI sensor domain management protocol support.
9  */
10 
11 #ifndef MOD_SCMI_SENSOR_H
12 #define MOD_SCMI_SENSOR_H
13 
14 #include <fwk_id.h>
15 #include <fwk_macros.h>
16 
17 #include <stddef.h>
18 #include <stdint.h>
19 
20 /*!
21  * \addtogroup GroupModules Modules
22  * \{
23  */
24 
25 /*!
26  * \defgroup GroupSCMI_SENSOR SCMI Sensor Protocol
27  * \{
28  */
29 
30 /*!
31  * \brief Sensor trip point event notification API.
32  *
33  * \details API used by the sensor module to notify the agents through the scmi
34  *      interface when a sensor trip point is triggered.
35  */
36 struct mod_sensor_trip_point_api {
37     /*!
38      * \brief Inform the HAL that a sensor trip point is triggered.
39      *
40      * \param sensor_id Specific sensor Id.
41      * \param state Trip point state.
42      * \param trip_point_id trip point index.
43      */
44     void (*notify_sensor_trip_point)(
45         fwk_id_t sensor_id,
46         uint32_t state,
47         uint32_t trip_point_idx);
48 };
49 
50 /*!
51  * \brief SCMI Sensor APIs.
52  *
53  * \details APIs exported by SCMI Sensor Protocol.
54  */
55 enum scmi_sensor_api_idx {
56     /*! Index for the SCMI Sensor request API */
57     SCMI_SENSOR_API_IDX_REQUEST,
58 
59     /*! Index for the SCMI Sensor trip point API */
60     SCMI_SENSOR_API_IDX_TRIP_POINT,
61 
62     /*! Number of APIs */
63     SCMI_SENSOR_API_IDX_COUNT,
64 };
65 
66 /*!
67  * \}
68  */
69 
70 /*!
71  * \}
72  */
73 
74 #endif /* MOD_SCMI_SENSOR_H */
75