mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
UAPI: (Scripted) Disintegrate include/linux
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
08cce05c5a
commit
607ca46e97
578 changed files with 32658 additions and 30107 deletions
|
@ -1,6 +1,3 @@
|
|||
#ifndef __RFKILL_H
|
||||
#define __RFKILL_H
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006 - 2007 Ivo van Doorn
|
||||
* Copyright (C) 2007 Dmitry Torokhov
|
||||
|
@ -18,92 +15,11 @@
|
|||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#ifndef __RFKILL_H
|
||||
#define __RFKILL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <uapi/linux/rfkill.h>
|
||||
|
||||
/* define userspace visible states */
|
||||
#define RFKILL_STATE_SOFT_BLOCKED 0
|
||||
#define RFKILL_STATE_UNBLOCKED 1
|
||||
#define RFKILL_STATE_HARD_BLOCKED 2
|
||||
|
||||
/**
|
||||
* enum rfkill_type - type of rfkill switch.
|
||||
*
|
||||
* @RFKILL_TYPE_ALL: toggles all switches (requests only - not a switch type)
|
||||
* @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device.
|
||||
* @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device.
|
||||
* @RFKILL_TYPE_UWB: switch is on a ultra wideband device.
|
||||
* @RFKILL_TYPE_WIMAX: switch is on a WiMAX device.
|
||||
* @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
|
||||
* @RFKILL_TYPE_GPS: switch is on a GPS device.
|
||||
* @RFKILL_TYPE_FM: switch is on a FM radio device.
|
||||
* @NUM_RFKILL_TYPES: number of defined rfkill types
|
||||
*/
|
||||
enum rfkill_type {
|
||||
RFKILL_TYPE_ALL = 0,
|
||||
RFKILL_TYPE_WLAN,
|
||||
RFKILL_TYPE_BLUETOOTH,
|
||||
RFKILL_TYPE_UWB,
|
||||
RFKILL_TYPE_WIMAX,
|
||||
RFKILL_TYPE_WWAN,
|
||||
RFKILL_TYPE_GPS,
|
||||
RFKILL_TYPE_FM,
|
||||
NUM_RFKILL_TYPES,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum rfkill_operation - operation types
|
||||
* @RFKILL_OP_ADD: a device was added
|
||||
* @RFKILL_OP_DEL: a device was removed
|
||||
* @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device
|
||||
* @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all)
|
||||
*/
|
||||
enum rfkill_operation {
|
||||
RFKILL_OP_ADD = 0,
|
||||
RFKILL_OP_DEL,
|
||||
RFKILL_OP_CHANGE,
|
||||
RFKILL_OP_CHANGE_ALL,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rfkill_event - events for userspace on /dev/rfkill
|
||||
* @idx: index of dev rfkill
|
||||
* @type: type of the rfkill struct
|
||||
* @op: operation code
|
||||
* @hard: hard state (0/1)
|
||||
* @soft: soft state (0/1)
|
||||
*
|
||||
* Structure used for userspace communication on /dev/rfkill,
|
||||
* used for events from the kernel and control to the kernel.
|
||||
*/
|
||||
struct rfkill_event {
|
||||
__u32 idx;
|
||||
__u8 type;
|
||||
__u8 op;
|
||||
__u8 soft, hard;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* We are planning to be backward and forward compatible with changes
|
||||
* to the event struct, by adding new, optional, members at the end.
|
||||
* When reading an event (whether the kernel from userspace or vice
|
||||
* versa) we need to accept anything that's at least as large as the
|
||||
* version 1 event size, but might be able to accept other sizes in
|
||||
* the future.
|
||||
*
|
||||
* One exception is the kernel -- we already have two event sizes in
|
||||
* that we've made the 'hard' member optional since our only option
|
||||
* is to ignore it anyway.
|
||||
*/
|
||||
#define RFKILL_EVENT_SIZE_V1 8
|
||||
|
||||
/* ioctl for turning off rfkill-input (if present) */
|
||||
#define RFKILL_IOC_MAGIC 'R'
|
||||
#define RFKILL_IOC_NOINPUT 1
|
||||
#define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
|
||||
|
||||
/* and that's all userspace gets */
|
||||
#ifdef __KERNEL__
|
||||
/* don't allow anyone to use these in the kernel */
|
||||
enum rfkill_user_states {
|
||||
RFKILL_USER_STATE_SOFT_BLOCKED = RFKILL_STATE_SOFT_BLOCKED,
|
||||
|
@ -385,6 +301,4 @@ rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* RFKILL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue