1 /*
2  * Copyright (c) 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_fw_mode_config.h
22  *
23  * Implementation for creating sysfs file fw_mode_config
24  */
25 
26 #ifndef _WLAN_HDD_SYSFS_FW_MODE_CONFIG_H
27 #define _WLAN_HDD_SYSFS_FW_MODE_CONFIG_H
28 
29 #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_SYSFS_FW_MODE_CFG)
30 /**
31  * hdd_sysfs_fw_mode_config_create() - API to create fw_mode_config sysfs file
32  * @driver_kobject: sysfs driver kobject
33  *
34  * file path: /sys/kernel/wifi/fw_mode_config
35  *
36  * usage:
37  *      echo [arg_0] [arg_1] > fw_mode_config
38  *
39  * Return: 0 on success and errno on failure
40  */
41 int hdd_sysfs_fw_mode_config_create(struct kobject *driver_kobject);
42 
43 /**
44  * hdd_sysfs_fw_mode_config_destroy() - API to destroy fw_mode_config sysfs file
45  * @driver_kobject: sysfs driver kobject
46  *
47  * Return: none
48  */
49 void
50 hdd_sysfs_fw_mode_config_destroy(struct kobject *driver_kobject);
51 #else
52 static inline int
hdd_sysfs_fw_mode_config_create(struct kobject * driver_kobject)53 hdd_sysfs_fw_mode_config_create(struct kobject *driver_kobject)
54 {
55 	return 0;
56 }
57 
58 static inline void
hdd_sysfs_fw_mode_config_destroy(struct kobject * driver_kobject)59 hdd_sysfs_fw_mode_config_destroy(struct kobject *driver_kobject)
60 {
61 }
62 #endif
63 #endif /* #ifndef _WLAN_HDD_SYSFS_FW_MODE_CONFIG_H */
64