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