xref: /wlan-dirver/qca-wifi-host-cmn/gpio/dispatcher/inc/wlan_gpio_ucfg_api.h (revision 97f44cd39e4ff816eaa1710279d28cf6b9e65ad9)
1 /*
2  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: wlan_gpio_ucfg_api.h
19  *
20  * This header file maintain API declaration required for northbound interaction
21  */
22 
23 #ifndef __WLAN_GPIO_CFG_UCFG_API_H__
24 #define __WLAN_GPIO_CFG_UCFG_API_H__
25 
26 #include <qdf_status.h>
27 #include <wmi_unified_param.h>
28 struct wlan_objmgr_psoc;
29 
30 #ifdef WLAN_FEATURE_GPIO_CFG
31 
32 /**
33  * ucfg_set_gpio_config() - API to set gpio config
34  * @psoc: the pointer of psoc object
35  * @param: the pointer of gpio configuration info
36  *
37  * Return:QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
38  */
39 QDF_STATUS ucfg_set_gpio_config(struct wlan_objmgr_psoc *psoc,
40 				struct gpio_config_params *param);
41 
42 /**
43  * ucfg_set_gpio_output() - API to set gpio output
44  * @psoc: the pointer of psoc object
45  * @param: the pointer of gpio output info
46  *
47  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
48  */
49 QDF_STATUS ucfg_set_gpio_output(struct wlan_objmgr_psoc *psoc,
50 				struct gpio_output_params *param);
51 #endif /* WLAN_FEATURE_GPIO_CFG */
52 #endif /* __WLAN_GPIO_CFG_UCFG_API_H__ */
53