| 1 | #[macro_export] |
| 2 | macro_rules! SW_LID { |
| 3 | () => { |
| 4 | 0x00 |
| 5 | }; |
| 6 | } |
| 7 | #[macro_export] |
| 8 | macro_rules! SW_TABLET_MODE { |
| 9 | () => { |
| 10 | 0x01 |
| 11 | }; |
| 12 | } |
| 13 | #[macro_export] |
| 14 | macro_rules! SW_HEADPHONE_INSERT { |
| 15 | () => { |
| 16 | 0x02 |
| 17 | }; |
| 18 | } |
| 19 | #[macro_export] |
| 20 | macro_rules! SW_RFKILL_ALL { |
| 21 | () => { |
| 22 | 0x03 |
| 23 | }; |
| 24 | } |
| 25 | // Deprecated since v2.6.26-rc5, kernel commit hash 5adad0133907790c50283bf03271d920d6897043 |
| 26 | #[deprecated(since = "2.6.26", note = "Use SW_RFKILL_ALL instead")] |
| 27 | #[macro_export] |
| 28 | macro_rules! SW_RADIO { |
| 29 | () => { |
| 30 | $crate::SW_RFKILL_ALL!() |
| 31 | }; |
| 32 | } |
| 33 | #[macro_export] |
| 34 | macro_rules! SW_MICROPHONE_INSERT { |
| 35 | () => { |
| 36 | 0x04 |
| 37 | }; |
| 38 | } |
| 39 | #[macro_export] |
| 40 | macro_rules! SW_DOCK { |
| 41 | () => { |
| 42 | 0x05 |
| 43 | }; |
| 44 | } |
| 45 | #[macro_export] |
| 46 | macro_rules! SW_LINEOUT_INSERT { |
| 47 | () => { |
| 48 | 0x06 |
| 49 | }; |
| 50 | } |
| 51 | #[macro_export] |
| 52 | macro_rules! SW_JACK_PHYSICAL_INSERT { |
| 53 | () => { |
| 54 | 0x07 |
| 55 | }; |
| 56 | } |
| 57 | #[macro_export] |
| 58 | macro_rules! SW_VIDEOOUT_INSERT { |
| 59 | () => { |
| 60 | 0x08 |
| 61 | }; |
| 62 | } |
| 63 | #[macro_export] |
| 64 | macro_rules! SW_CAMERA_LENS_COVER { |
| 65 | () => { |
| 66 | 0x09 |
| 67 | }; |
| 68 | } |
| 69 | #[macro_export] |
| 70 | macro_rules! SW_KEYPAD_SLIDE { |
| 71 | () => { |
| 72 | 0x0a |
| 73 | }; |
| 74 | } |
| 75 | #[macro_export] |
| 76 | macro_rules! SW_FRONT_PROXIMITY { |
| 77 | () => { |
| 78 | 0x0b |
| 79 | }; |
| 80 | } |
| 81 | #[macro_export] |
| 82 | macro_rules! SW_ROTATE_LOCK { |
| 83 | () => { |
| 84 | 0x0c |
| 85 | }; |
| 86 | } |
| 87 | #[macro_export] |
| 88 | macro_rules! SW_LINEIN_INSERT { |
| 89 | () => { |
| 90 | 0x0d |
| 91 | }; |
| 92 | } |
| 93 | #[macro_export] |
| 94 | macro_rules! SW_MUTE_DEVICE { |
| 95 | () => { |
| 96 | 0x0e |
| 97 | }; |
| 98 | } |
| 99 | #[macro_export] |
| 100 | macro_rules! SW_PEN_INSERTED { |
| 101 | () => { |
| 102 | 0x0f |
| 103 | }; |
| 104 | } |
| 105 | #[macro_export] |
| 106 | macro_rules! SW_MACHINE_COVER { |
| 107 | () => { |
| 108 | 0x10 |
| 109 | }; |
| 110 | } |
| 111 | #[macro_export] |
| 112 | macro_rules! SW_MAX { |
| 113 | () => { |
| 114 | 0x10 |
| 115 | }; |
| 116 | } |
| 117 | #[macro_export] |
| 118 | macro_rules! SW_CNT { |
| 119 | () => { |
| 120 | ($crate::SW_MAX!() + 1) |
| 121 | }; |
| 122 | } |