xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_sysfs_wow_ito.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: wlan_hdd_sysfs_wow_ito.h
22  *
23  * implementation for creating sysfs file wow_ito
24  */
25 
26 #ifndef _WLAN_HDD_SYSFS_WOW_ITO_H
27 #define _WLAN_HDD_SYSFS_WOW_ITO_H
28 
29 #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_WOW_ITO)
30 /**
31  * hdd_sysfs_wow_ito_create() - API to create wow_ito
32  * @driver_kobject: sysfs driver kobject
33  *
34  * file path: /sys/kernel/wifi/wow_ito
35  *
36  * usage:
37  *      echo [arg_0] > wow_ito
38  *
39  * Return: 0 on success and errno on failure
40  */
41 int hdd_sysfs_wow_ito_create(struct kobject *driver_kobject);
42 
43 /**
44  * hdd_sysfs_wow_ito_destroy() - API to destroy wow_ito
45  * @driver_kobject: sysfs driver kobject
46  *
47  * Return: none
48  */
49 void
50 hdd_sysfs_wow_ito_destroy(struct kobject *driver_kobject);
51 #else
52 static inline int
hdd_sysfs_wow_ito_create(struct kobject * driver_kobject)53 hdd_sysfs_wow_ito_create(struct kobject *driver_kobject)
54 {
55 	return 0;
56 }
57 
58 static inline void
hdd_sysfs_wow_ito_destroy(struct kobject * driver_kobject)59 hdd_sysfs_wow_ito_destroy(struct kobject *driver_kobject)
60 {
61 }
62 #endif
63 #endif /* #ifndef _WLAN_HDD_SYSFS_WOW_ITO_H */
64