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 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_hdd_sysfs_motion_detection.h
20 *
21 * implementation for creating sysfs file motion_detection
22 */
23
24 #ifndef _WLAN_HDD_SYSFS_MOTION_DETECTION_H
25 #define _WLAN_HDD_SYSFS_MOTION_DETECTION_H
26
27 #if defined(WLAN_SYSFS) && defined(WLAN_FEATURE_MOTION_DETECTION)
28 /**
29 * hdd_sysfs_motion_detection_create() - API to create motion
30 * detection sysfs attributes
31 * @adapter: hdd adapter
32 *
33 * This API creates the following sysfs attributes:
34 * 1. mt_bl_config
35 * 2. mt_bl_start
36 * 3. mt_config
37 * 4. mt_start
38 *
39 * mt_bl_config: this file is created per adapter.
40 * file path: /sys/class/net/wlanxx/mt_bl_config
41 * (wlanxx is adapter name)
42 * usage:
43 * echo [arg_0] [arg_1] [arg_2] [arg_3] > mt_bl_config
44 *
45 * mt_bl_start: this file is created per adapter.
46 * file path: /sys/class/net/wlanxx/mt_bl_start
47 * (wlanxx is adapter name)
48 * usage:
49 * echo [arg_0] > mt_bl_start
50 *
51 * mt_config: this file is created per adapter.
52 * file path: /sys/class/net/wlanxx/mt_config
53 * (wlanxx is adapter name)
54 * usage:
55 * echo [arg_0] [arg_1] [arg_2] [arg_4] [arg_5] [arg_6] [arg_7] [arg_8]
56 * [arg_9] [arg_10] [arg_11] [arg_12] [arg_13] [arg_14] > mt_config
57 *
58 * mt_start: this file is created per adapter.
59 * file path: /sys/class/net/wlanxx/mt_start
60 * (wlanxx is adapter name)
61 * usage:
62 * echo [arg_0] > mt_start
63 *
64 * Return: None
65 */
66 void hdd_sysfs_motion_detection_create(struct hdd_adapter *adapter);
67
68 /**
69 * hdd_sysfs_motion_detection_destroy() -
70 * API to destroy motion detection sysfs attributes
71 * @adapter: pointer to adapter
72 *
73 * Return: none
74 */
75 void hdd_sysfs_motion_detection_destroy(struct hdd_adapter *adapter);
76
77 #else
78 static inline void
hdd_sysfs_motion_detection_create(struct hdd_adapter * adapter)79 hdd_sysfs_motion_detection_create(struct hdd_adapter *adapter)
80 {
81 }
82
83 static inline void
hdd_sysfs_motion_detection_destroy(struct hdd_adapter * adapter)84 hdd_sysfs_motion_detection_destroy(struct hdd_adapter *adapter)
85 {
86 }
87 #endif
88 #endif /* #ifndef _WLAN_HDD_SYSFS_MOTION_DETECTION_H */
89