1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #ifndef ZEPHYR_SOC_NORDIC_NRF54H_GPD_INCLUDE_NRF_GPD_H_
7 #define ZEPHYR_SOC_NORDIC_NRF54H_GPD_INCLUDE_NRF_GPD_H_
8 
9 #include <stdint.h>
10 
11 #include <zephyr/dt-bindings/power/nordic-nrf-gpd.h>
12 #include <zephyr/drivers/pinctrl.h>
13 
14 /**
15  * @brief Request a global power domain.
16  *
17  * @param id Domain ID.
18  *
19  * @retval 0 If the request was successful.
20  * @retval -errno If the request was not successful.
21  */
22 int nrf_gpd_request(uint8_t id);
23 
24 /**
25  * @brief Release a global power domain.
26  *
27  * @param id Domain ID.
28  *
29  * @retval 0 If the request was successful.
30  * @retval -errno If the request was not successful.
31  */
32 int nrf_gpd_release(uint8_t id);
33 
34 /**
35  * @brief Retain set/clear a set of pins.
36  *
37  * @param pcfg Device pin configuration.
38  * @param retain Retain or not.
39  *
40  * @retval 0 If the request was successful.
41  * @retval -errno If the request was not successful.
42  */
43 int nrf_gpd_retain_pins_set(const struct pinctrl_dev_config *pcfg, bool retain);
44 
45 #endif /* ZEPHYR_SOC_NORDIC_NRF54H_GPD_INCLUDE_NRF_GPD_H_ */
46