zephyr/soc/nordic/nrf54h/gpd/include/nrf/gpd.h
Gerard Marull-Paretas 77fc18327a soc: nordic: nrf54h: gpd: add API to set/clear pin retention
This API needs to be called by FAST peripherals before/after
disabling/enabling them.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00

46 lines
1.1 KiB
C

/*
* Copyright (c) 2024 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_SOC_NORDIC_NRF54H_GPD_INCLUDE_NRF_GPD_H_
#define ZEPHYR_SOC_NORDIC_NRF54H_GPD_INCLUDE_NRF_GPD_H_
#include <stdint.h>
#include <zephyr/dt-bindings/power/nordic-nrf-gpd.h>
#include <zephyr/drivers/pinctrl.h>
/**
* @brief Request a global power domain.
*
* @param id Domain ID.
*
* @retval 0 If the request was successful.
* @retval -errno If the request was not successful.
*/
int nrf_gpd_request(uint8_t id);
/**
* @brief Release a global power domain.
*
* @param id Domain ID.
*
* @retval 0 If the request was successful.
* @retval -errno If the request was not successful.
*/
int nrf_gpd_release(uint8_t id);
/**
* @brief Retain set/clear a set of pins.
*
* @param pcfg Device pin configuration.
* @param retain Retain or not.
*
* @retval 0 If the request was successful.
* @retval -errno If the request was not successful.
*/
int nrf_gpd_retain_pins_set(const struct pinctrl_dev_config *pcfg, bool retain);
#endif /* ZEPHYR_SOC_NORDIC_NRF54H_GPD_INCLUDE_NRF_GPD_H_ */