xref: /wlan-driver/qca-wifi-host-cmn/os_if/linux/gpio/inc/wlan_cfg80211_gpio.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 /**
19  * DOC: wlan_cfg80211_gpio.h
20  *
21  * This Header file provide declaration for cfg80211 command handler API
22  */
23 
24 #ifndef __WLAN_CFG80211_GPIO_CFG_H__
25 #define __WLAN_CFG80211_GPIO_CFG_H__
26 
27 #include <wlan_objmgr_cmn.h>
28 #include <qdf_types.h>
29 #include <net/cfg80211.h>
30 #include <qca_vendor.h>
31 
32 #ifdef WLAN_FEATURE_GPIO_CFG
33 
34 extern const struct nla_policy
35 	wlan_cfg80211_gpio_config_policy
36 	[QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MAX + 1];
37 
38 /**
39  * wlan_cfg80211_start_gpio_config() - set GPIO config
40  * @wiphy: target wiphy
41  * @psoc: pointer to psoc common object
42  * @data: Pointer to the data to be passed via vendor interface
43  * @data_len: Length of the data to be passed
44  *
45  * Return: Return the Success or Failure code
46  */
47 int wlan_cfg80211_start_gpio_config(struct wiphy *wiphy,
48 				    struct wlan_objmgr_psoc *psoc,
49 				    const void *data, int data_len);
50 #else
51 static inline
wlan_cfg80211_start_gpio_config(struct wiphy * wiphy,struct wlan_objmgr_psoc * psoc,const void * data,int data_len)52 int wlan_cfg80211_start_gpio_config(struct wiphy *wiphy,
53 				    struct wlan_objmgr_psoc *psoc,
54 				    const void *data, int data_len)
55 {
56 	return 0;
57 }
58 #endif /* WLAN_FEATURE_GPIO_CFG */
59 #endif /* __WLAN_CFG80211_GPIO_CFG_H__ */
60