Patrick Georgi | 11f0079 | 2020-03-04 15:10:45 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Joe Bao | 806def8 | 2008-12-02 02:56:38 +0000 | [diff] [blame] | 2 | |
| 3 | |
| 4 | /* Status and notification definitions */ |
| 5 | |
| 6 | #define STA_MISSING 0x00 |
| 7 | #define STA_PRESENT 0x01 |
| 8 | #define STA_ENABLED 0x03 |
| 9 | #define STA_DISABLED 0x09 |
| 10 | #define STA_INVISIBLE 0x0B |
| 11 | #define STA_UNAVAILABLE 0x0D |
| 12 | #define STA_VISIBLE 0x0F |
| 13 | |
| 14 | /* SMBus status codes */ |
| 15 | #define SMB_OK 0x00 |
| 16 | #define SMB_UnknownFail 0x07 |
| 17 | #define SMB_DevAddrNAK 0x10 |
| 18 | #define SMB_DeviceError 0x11 |
| 19 | #define SMB_DevCmdDenied 0x12 |
| 20 | #define SMB_UnknownErr 0x13 |
| 21 | #define SMB_DevAccDenied 0x17 |
| 22 | #define SMB_Timeout 0x18 |
| 23 | #define SMB_HstUnsuppProtocol 0x19 |
| 24 | #define SMB_Busy 0x1A |
| 25 | #define SMB_PktChkError 0x1F |
| 26 | |
| 27 | /* Device Object Notification Values */ |
| 28 | #define NOTIFY_BUS_CHECK 0x00 |
| 29 | #define NOTIFY_DEVICE_CHECK 0x01 |
| 30 | #define NOTIFY_DEVICE_WAKE 0x02 |
| 31 | #define NOTIFY_EJECT_REQUEST 0x03 |
| 32 | #define NOTIFY_DEVICE_CHECK_JR 0x04 |
| 33 | #define NOTIFY_FREQUENCY_ERROR 0x05 |
| 34 | #define NOTIFY_BUS_MODE 0x06 |
| 35 | #define NOTIFY_POWER_FAULT 0x07 |
| 36 | #define NOTIFY_CAPABILITIES 0x08 |
| 37 | #define NOTIFY_PLD_CHECK 0x09 |
| 38 | #define NOTIFY_SLIT_UPDATE 0x0B |
| 39 | |
| 40 | /* Battery Device Notification Values */ |
| 41 | #define NOTIFY_BAT_STATUSCHG 0x80 |
Elyes HAOUAS | 879eab8 | 2018-01-25 20:31:05 +0100 | [diff] [blame] | 42 | #define NOTIFY_BAT_INFOCHG 0x81 |
Joe Bao | 806def8 | 2008-12-02 02:56:38 +0000 | [diff] [blame] | 43 | #define NOTIFY_BAT_MAINTDATA 0x82 |
| 44 | |
| 45 | /* Power Source Object Notification Values */ |
| 46 | #define NOTIFY_PWR_STATUSCHG 0x80 |
| 47 | |
| 48 | /* Thermal Zone Object Notification Values */ |
| 49 | #define NOTIFY_TZ_STATUSCHG 0x80 |
| 50 | #define NOTIFY_TZ_TRIPPTCHG 0x81 |
| 51 | #define NOTIFY_TZ_DEVLISTCHG 0x82 |
Elyes HAOUAS | 879eab8 | 2018-01-25 20:31:05 +0100 | [diff] [blame] | 52 | #define NOTIFY_TZ_RELTBLCHG 0x83 |
Joe Bao | 806def8 | 2008-12-02 02:56:38 +0000 | [diff] [blame] | 53 | |
| 54 | /* Power Button Notification Values */ |
| 55 | #define NOTIFY_POWER_BUTTON 0x80 |
| 56 | |
| 57 | /* Sleep Button Notification Values */ |
| 58 | #define NOTIFY_SLEEP_BUTTON 0x80 |
| 59 | |
| 60 | /* Lid Notification Values */ |
| 61 | #define NOTIFY_LID_STATUSCHG 0x80 |
| 62 | |
| 63 | /* Processor Device Notification Values */ |
Elyes HAOUAS | 879eab8 | 2018-01-25 20:31:05 +0100 | [diff] [blame] | 64 | #define NOTIFY_CPU_PPCCHG 0x80 |
| 65 | #define NOTIFY_CPU_CSTATECHG 0x81 |
Joe Bao | 806def8 | 2008-12-02 02:56:38 +0000 | [diff] [blame] | 66 | #define NOTIFY_CPU_THROTLCHG 0x82 |
| 67 | |
| 68 | /* User Presence Device Notification Values */ |
| 69 | #define NOTIFY_USR_PRESNCECHG 0x80 |
| 70 | |
| 71 | /* Battery Device Notification Values */ |
Elyes HAOUAS | 879eab8 | 2018-01-25 20:31:05 +0100 | [diff] [blame] | 72 | #define NOTIFY_ALS_ILLUMCHG 0x80 |
| 73 | #define NOTIFY_ALS_COLORTMPCHG 0x81 |
Joe Bao | 806def8 | 2008-12-02 02:56:38 +0000 | [diff] [blame] | 74 | #define NOTIFY_ALS_RESPCHG 0x82 |