|
#define | pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|
#define | TPACPI_VERSION "0.24" |
|
#define | TPACPI_SYSFS_VERSION 0x020700 |
|
#define | TP_CMOS_VOLUME_DOWN 0 |
|
#define | TP_CMOS_VOLUME_UP 1 |
|
#define | TP_CMOS_VOLUME_MUTE 2 |
|
#define | TP_CMOS_BRIGHTNESS_UP 4 |
|
#define | TP_CMOS_BRIGHTNESS_DOWN 5 |
|
#define | TP_CMOS_THINKLIGHT_ON 12 |
|
#define | TP_CMOS_THINKLIGHT_OFF 13 |
|
#define | TPACPI_ACPI_IBM_HKEY_HID "IBM0068" |
|
#define | TPACPI_ACPI_LENOVO_HKEY_HID "LEN0068" |
|
#define | TPACPI_ACPI_EC_HID "PNP0C09" |
|
#define | TPACPI_HKEY_INPUT_PRODUCT 0x5054 /* "TP" */ |
|
#define | TPACPI_HKEY_INPUT_VERSION 0x4101 |
|
#define | TPACPI_NAME "thinkpad" |
|
#define | TPACPI_DESC "ThinkPad ACPI Extras" |
|
#define | TPACPI_FILE TPACPI_NAME "_acpi" |
|
#define | TPACPI_URL "http://ibm-acpi.sf.net/" |
|
#define | TPACPI_MAIL "[email protected]" |
|
#define | TPACPI_PROC_DIR "ibm" |
|
#define | TPACPI_ACPI_EVENT_PREFIX "ibm" |
|
#define | TPACPI_DRVR_NAME TPACPI_FILE |
|
#define | TPACPI_DRVR_SHORTNAME "tpacpi" |
|
#define | TPACPI_HWMON_DRVR_NAME TPACPI_NAME "_hwmon" |
|
#define | TPACPI_NVRAM_KTHREAD_NAME "ktpacpi_nvramd" |
|
#define | TPACPI_WORKQUEUE_NAME "ktpacpid" |
|
#define | TPACPI_MAX_ACPI_ARGS 3 |
|
#define | TPACPI_DBG_ALL 0xffff |
|
#define | TPACPI_DBG_DISCLOSETASK 0x8000 |
|
#define | TPACPI_DBG_INIT 0x0001 |
|
#define | TPACPI_DBG_EXIT 0x0002 |
|
#define | TPACPI_DBG_RFKILL 0x0004 |
|
#define | TPACPI_DBG_HKEY 0x0008 |
|
#define | TPACPI_DBG_FAN 0x0010 |
|
#define | TPACPI_DBG_BRGHT 0x0020 |
|
#define | TPACPI_DBG_MIXER 0x0040 |
|
#define | onoff(status, bit) ((status) & (1 << (bit)) ? "on" : "off") |
|
#define | enabled(status, bit) ((status) & (1 << (bit)) ? "enabled" : "disabled") |
|
#define | strlencmp(a, b) (strncmp((a), (b), strlen(b))) |
|
#define | dbg_printk(a_dbg_level, format, arg...) |
|
#define | vdbg_printk(a_dbg_level, format, arg...) no_printk(format, ##arg) |
|
#define | tpacpi_disclose_usertask(what, format, arg...) |
|
#define | TPACPI_MATCH_ANY 0xffffU |
|
#define | TPACPI_MATCH_UNKNOWN 0U |
|
#define | TPID(__c1, __c2) (((__c2) << 8) | (__c1)) |
|
#define | TPACPI_Q_IBM(__id1, __id2, __quirk) |
|
#define | TPACPI_Q_LNV(__id1, __id2, __quirk) |
|
#define | TPACPI_QEC_LNV(__id1, __id2, __quirk) |
|
#define | TPACPI_HANDLE(object, parent, paths...) |
|
#define | TPACPI_ACPIHANDLE_INIT(object) |
|
#define | destroy_attr_set(_set) kfree(_set); |
|
#define | register_attr_set_with_sysfs(_attr_set, _kobj) sysfs_create_group(_kobj, &_attr_set->group) |
|
#define | TPV_Q(__v, __id1, __id2, __bv1, __bv2) |
|
#define | TPV_Q_X(__v, __bid1, __bid2, __bv1, __bv2, __eid, __ev1, __ev2) |
|
#define | TPV_QI0(__id1, __id2, __bv1, __bv2) TPV_Q(PCI_VENDOR_ID_IBM, __id1, __id2, __bv1, __bv2) |
|
#define | TPV_QI1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) |
|
#define | TPV_QI2(__bid1, __bid2, __bv1, __bv2,__eid1, __eid2, __ev1, __ev2) |
|
#define | TPV_QL0(__id1, __id2, __bv1, __bv2) TPV_Q(PCI_VENDOR_ID_LENOVO, __id1, __id2, __bv1, __bv2) |
|
#define | TPV_QL1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) |
|
#define | TPV_QL2(__bid1, __bid2, __bv1, __bv2,__eid1, __eid2, __ev1, __ev2) |
|
#define | hotkey_source_mask 0U |
|
#define | HOTKEY_CONFIG_CRITICAL_START |
|
#define | HOTKEY_CONFIG_CRITICAL_END |
|
#define | TP_HOTKEY_TABLET_MASK (1 << 3) |
|
#define | TPACPI_HK_Q_INIMASK 0x0001 |
|
#define | TPACPI_HOTKEY_MAP_SIZE sizeof(tpacpi_keymap_t) |
|
#define | TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_entry_t) |
|
#define | TPACPI_RFK_BLUETOOTH_SW_NAME "tpacpi_bluetooth_sw" |
|
#define | TPACPI_RFK_WWAN_SW_NAME "tpacpi_wwan_sw" |
|
#define | TPACPI_RFK_UWB_SW_NAME "tpacpi_uwb_sw" |
|
#define | TPACPI_LED_NUMLEDS 16 |
|
#define | TPACPI_SAFE_LEDS 0x1081U |
|
#define | str_led_status(s) |
|
#define | TPACPI_BEEP_Q1 0x0001 |
|
#define | TPACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */ |
|
#define | THERMAL_SENSOR_ATTR_TEMP(_idxA, _idxB) |
|
#define | THERMAL_ATTRS(X) &sensor_dev_attr_thermal_temp_input[X].dev_attr.attr |
|
#define | TPACPI_BACKLIGHT_DEV_NAME "thinkpad_screen" |
|
#define | TPACPI_BRGHT_Q_NOEC 0x0001 /* Must NOT use EC HBRV */ |
|
#define | TPACPI_BRGHT_Q_EC 0x0002 /* Should or must use EC HBRV */ |
|
#define | TPACPI_BRGHT_Q_ASK 0x8000 /* Ask for user report */ |
|
#define | alsa_card NULL |
|
#define | TPACPI_FAN_Q1 0x0001 /* Unitialized HFSP */ |
|
#define | TPACPI_FAN_2FAN 0x0002 /* EC 0x31 bit 0 selects fan2 */ |
|
#define | TPACPI_FAN_QI(__id1, __id2, __quirks) |
|
#define | TPACPI_FAN_QL(__id1, __id2, __quirks) |
|
#define | TPACPI_PARAM(feature) |
|
#define | IBM_BIOS_MODULE_ALIAS(__type) MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*") |
|
|
enum | tp_nvram_addr {
TP_NVRAM_ADDR_HK2 = 0x57,
TP_NVRAM_ADDR_THINKLIGHT = 0x58,
TP_NVRAM_ADDR_VIDEO = 0x59,
TP_NVRAM_ADDR_BRIGHTNESS = 0x5e,
TP_NVRAM_ADDR_MIXER = 0x60
} |
|
enum | {
TP_NVRAM_MASK_HKT_THINKPAD = 0x08,
TP_NVRAM_MASK_HKT_ZOOM = 0x20,
TP_NVRAM_MASK_HKT_DISPLAY = 0x40,
TP_NVRAM_MASK_HKT_HIBERNATE = 0x80,
TP_NVRAM_MASK_THINKLIGHT = 0x10,
TP_NVRAM_MASK_HKT_DISPEXPND = 0x30,
TP_NVRAM_MASK_HKT_BRIGHTNESS = 0x20,
TP_NVRAM_MASK_LEVEL_BRIGHTNESS = 0x0f,
TP_NVRAM_POS_LEVEL_BRIGHTNESS = 0,
TP_NVRAM_MASK_MUTE = 0x40,
TP_NVRAM_MASK_HKT_VOLUME = 0x80,
TP_NVRAM_MASK_LEVEL_VOLUME = 0x0f,
TP_NVRAM_POS_LEVEL_VOLUME = 0
} |
|
enum | { TP_NVRAM_LEVEL_VOLUME_MAX = 14
} |
|
enum | { TP_ACPI_WGSV_GET_STATE = 0x01,
TP_ACPI_WGSV_PWR_ON_ON_RESUME = 0x02,
TP_ACPI_WGSV_PWR_OFF_ON_RESUME = 0x03,
TP_ACPI_WGSV_SAVE_STATE = 0x04
} |
|
enum | {
TP_ACPI_WGSV_STATE_WWANEXIST = 0x0001,
TP_ACPI_WGSV_STATE_WWANPWR = 0x0002,
TP_ACPI_WGSV_STATE_WWANPWRRES = 0x0004,
TP_ACPI_WGSV_STATE_WWANBIOSOFF = 0x0008,
TP_ACPI_WGSV_STATE_BLTHEXIST = 0x0001,
TP_ACPI_WGSV_STATE_BLTHPWR = 0x0002,
TP_ACPI_WGSV_STATE_BLTHPWRRES = 0x0004,
TP_ACPI_WGSV_STATE_BLTHBIOSOFF = 0x0008,
TP_ACPI_WGSV_STATE_UWBEXIST = 0x0010,
TP_ACPI_WGSV_STATE_UWBPWR = 0x0020
} |
|
enum | tpacpi_hkey_event_t {
TP_HKEY_EV_HOTKEY_BASE = 0x1001,
TP_HKEY_EV_BRGHT_UP = 0x1010,
TP_HKEY_EV_BRGHT_DOWN = 0x1011,
TP_HKEY_EV_VOL_UP = 0x1015,
TP_HKEY_EV_VOL_DOWN = 0x1016,
TP_HKEY_EV_VOL_MUTE = 0x1017,
TP_HKEY_EV_WKUP_S3_UNDOCK = 0x2304,
TP_HKEY_EV_WKUP_S4_UNDOCK = 0x2404,
TP_HKEY_EV_WKUP_S3_BAYEJ = 0x2305,
TP_HKEY_EV_WKUP_S4_BAYEJ = 0x2405,
TP_HKEY_EV_WKUP_S3_BATLOW = 0x2313,
TP_HKEY_EV_WKUP_S4_BATLOW = 0x2413,
TP_HKEY_EV_BAYEJ_ACK = 0x3003,
TP_HKEY_EV_UNDOCK_ACK = 0x4003,
TP_HKEY_EV_OPTDRV_EJ = 0x3006,
TP_HKEY_EV_HOTPLUG_DOCK = 0x4010,
TP_HKEY_EV_HOTPLUG_UNDOCK = 0x4011,
TP_HKEY_EV_LID_CLOSE = 0x5001,
TP_HKEY_EV_LID_OPEN = 0x5002,
TP_HKEY_EV_TABLET_TABLET = 0x5009,
TP_HKEY_EV_TABLET_NOTEBOOK = 0x500a,
TP_HKEY_EV_PEN_INSERTED = 0x500b,
TP_HKEY_EV_PEN_REMOVED = 0x500c,
TP_HKEY_EV_BRGHT_CHANGED = 0x5010,
TP_HKEY_EV_KEY_NUMLOCK = 0x6000,
TP_HKEY_EV_KEY_FN = 0x6005,
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011,
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012,
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021,
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022,
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030,
TP_HKEY_EV_UNK_6040 = 0x6040,
TP_HKEY_EV_RFKILL_CHANGED = 0x7000
} |
|
enum | { TPACPI_LIFE_INIT = 0,
TPACPI_LIFE_RUNNING,
TPACPI_LIFE_EXITING
} |
|
enum | led_status_t { TPACPI_LED_OFF = 0,
TPACPI_LED_ON,
TPACPI_LED_BLINK
} |
|
enum | tpacpi_rfkill_state { TPACPI_RFK_RADIO_OFF = 0,
TPACPI_RFK_RADIO_ON
} |
|
enum | tpacpi_rfk_id { TPACPI_RFK_BLUETOOTH_SW_ID = 0,
TPACPI_RFK_WWAN_SW_ID,
TPACPI_RFK_UWB_SW_ID,
TPACPI_RFK_SW_MAX
} |
|
enum | {
TP_ACPI_HOTKEYSCAN_FNF1 = 0,
TP_ACPI_HOTKEYSCAN_FNF2,
TP_ACPI_HOTKEYSCAN_FNF3,
TP_ACPI_HOTKEYSCAN_FNF4,
TP_ACPI_HOTKEYSCAN_FNF5,
TP_ACPI_HOTKEYSCAN_FNF6,
TP_ACPI_HOTKEYSCAN_FNF7,
TP_ACPI_HOTKEYSCAN_FNF8,
TP_ACPI_HOTKEYSCAN_FNF9,
TP_ACPI_HOTKEYSCAN_FNF10,
TP_ACPI_HOTKEYSCAN_FNF11,
TP_ACPI_HOTKEYSCAN_FNF12,
TP_ACPI_HOTKEYSCAN_FNBACKSPACE,
TP_ACPI_HOTKEYSCAN_FNINSERT,
TP_ACPI_HOTKEYSCAN_FNDELETE,
TP_ACPI_HOTKEYSCAN_FNHOME,
TP_ACPI_HOTKEYSCAN_FNEND,
TP_ACPI_HOTKEYSCAN_FNPAGEUP,
TP_ACPI_HOTKEYSCAN_FNPAGEDOWN,
TP_ACPI_HOTKEYSCAN_FNSPACE,
TP_ACPI_HOTKEYSCAN_VOLUMEUP,
TP_ACPI_HOTKEYSCAN_VOLUMEDOWN,
TP_ACPI_HOTKEYSCAN_MUTE,
TP_ACPI_HOTKEYSCAN_THINKPAD,
TP_ACPI_HOTK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 0,
TP_ACPI_WAKEUP_BAYEJ,
TP_ACPI_WAKEUP_UNDOCK
} |
|
enum | { TP_ACPI_BLUETOOTH_HWPRESENT = 0x01,
TP_ACPI_BLUETOOTH_RADIOSSW = 0x02,
TP_ACPI_BLUETOOTH_RESUMECTRL = 0x04
} |
|
enum | {
TP_ACPI_BLTH_GET_ULTRAPORT_ID = 0x00,
TP_ACPI_BLTH_GET_PWR_ON_RESUME = 0x01,
TP_ACPI_BLTH_PWR_ON_ON_RESUME = 0x02,
TP_ACPI_BLTH_PWR_OFF_ON_RESUME = 0x03,
TP_ACPI_BLTH_SAVE_STATE = 0x05
} |
|
enum | { TP_ACPI_WANCARD_HWPRESENT = 0x01,
TP_ACPI_WANCARD_RADIOSSW = 0x02,
TP_ACPI_WANCARD_RESUMECTRL = 0x04
} |
|
enum | { TP_ACPI_UWB_HWPRESENT = 0x01,
TP_ACPI_UWB_RADIOSSW = 0x02
} |
|
enum | led_access_mode { TPACPI_LED_NONE = 0,
TPACPI_LED_570,
TPACPI_LED_OLD,
TPACPI_LED_NEW
} |
|
enum | { TPACPI_LED_EC_HLCL = 0x0c,
TPACPI_LED_EC_HLBL = 0x0d,
TPACPI_LED_EC_HLMS = 0x0e
} |
|
enum | thermal_access_mode {
TPACPI_THERMAL_NONE = 0,
TPACPI_THERMAL_ACPI_TMP07,
TPACPI_THERMAL_ACPI_UPDT,
TPACPI_THERMAL_TPEC_8,
TPACPI_THERMAL_TPEC_16
} |
|
enum | { TP_EC_THERMAL_TMP0 = 0x78,
TP_EC_THERMAL_TMP8 = 0xC0,
TP_EC_THERMAL_TMP_NA = -128,
TPACPI_THERMAL_SENSOR_NA = -128000
} |
|
enum | { TP_EC_BACKLIGHT = 0x31,
TP_EC_BACKLIGHT_LVLMSK = 0x1F,
TP_EC_BACKLIGHT_CMDMSK = 0xE0,
TP_EC_BACKLIGHT_MAPSW = 0x20
} |
|
enum | tpacpi_brightness_access_mode {
TPACPI_BRGHT_MODE_AUTO = 0,
TPACPI_BRGHT_MODE_EC,
TPACPI_BRGHT_MODE_UCMS_STEP,
TPACPI_BRGHT_MODE_ECNVRAM,
TPACPI_BRGHT_MODE_MAX
} |
|
enum | {
fan_status_offset = 0x2f,
fan_rpm_offset = 0x84,
fan_select_offset = 0x31,
TP_EC_FAN_FULLSPEED = 0x40,
TP_EC_FAN_AUTO = 0x80,
TPACPI_FAN_LAST_LEVEL = 0x100
} |
|
enum | fan_status_access_mode { TPACPI_FAN_NONE = 0,
TPACPI_FAN_RD_ACPI_GFAN,
TPACPI_FAN_RD_TPEC
} |
|
enum | fan_control_access_mode { TPACPI_FAN_WR_NONE = 0,
TPACPI_FAN_WR_ACPI_SFAN,
TPACPI_FAN_WR_TPEC,
TPACPI_FAN_WR_ACPI_FANS
} |
|
enum | fan_control_commands { TPACPI_FAN_CMD_SPEED = 0x0001,
TPACPI_FAN_CMD_LEVEL = 0x0002,
TPACPI_FAN_CMD_ENABLE = 0x0004
} |
|
|
| TPACPI_HANDLE (ecrd, ec,"ECRD") |
|
| TPACPI_HANDLE (ecwr, ec,"ECWR") |
|
| TPACPI_HANDLE (cmos, root,"\\UCMS","\\CMOS","\\CMS",) |
|
| TPACPI_HANDLE (hkey, ec,"\\_SB.HKEY","^HKEY","HKEY",) |
|
struct attribute_set_obj | __attribute__ ((packed)) |
|
| TPACPI_HANDLE (lght, root,"\\LGHT") |
|
| TPACPI_HANDLE (ledb, ec,"LEDB") |
|
| TPACPI_HANDLE (beep, ec,"BEEP") |
|
| TPACPI_HANDLE (fans, ec,"FANS") |
|
| TPACPI_HANDLE (gfan, ec,"GFAN","\\FSPD",) |
|
| TPACPI_HANDLE (sfan, ec,"SFAN","JFNS",) |
|
| module_param (experimental, int, 0444) |
|
| MODULE_PARM_DESC (experimental,"Enables experimental features when non-zero") |
|
| module_param_named (debug, dbg_level, uint, 0) |
|
| MODULE_PARM_DESC (debug,"Sets debug level bit-mask") |
|
| module_param (force_load, bool, 0444) |
|
| MODULE_PARM_DESC (force_load,"Attempts to load the driver even on a ""mis-identified ThinkPad when true") |
|
| module_param_named (fan_control, fan_control_allowed, bool, 0444) |
|
| MODULE_PARM_DESC (fan_control,"Enables setting fan parameters features when true") |
|
| module_param_named (brightness_mode, brightness_mode, uint, 0444) |
|
| MODULE_PARM_DESC (brightness_mode,"Selects brightness control strategy: ""0=auto, 1=EC, 2=UCMS, 3=EC+NVRAM") |
|
| module_param (brightness_enable, uint, 0444) |
|
| MODULE_PARM_DESC (brightness_enable,"Enables backlight control when 1, disables when 0") |
|
| module_param (hotkey_report_mode, uint, 0444) |
|
| MODULE_PARM_DESC (hotkey_report_mode,"used for backwards compatibility with userspace, ""see documentation") |
|
| TPACPI_PARAM (hotkey) |
|
| TPACPI_PARAM (bluetooth) |
|
| TPACPI_PARAM (video) |
|
| TPACPI_PARAM (light) |
|
| TPACPI_PARAM (cmos) |
|
| TPACPI_PARAM (led) |
|
| TPACPI_PARAM (beep) |
|
| TPACPI_PARAM (brightness) |
|
| TPACPI_PARAM (volume) |
|
| TPACPI_PARAM (fan) |
|
| MODULE_ALIAS (TPACPI_DRVR_SHORTNAME) |
|
| MODULE_DEVICE_TABLE (acpi, ibm_htk_device_ids) |
|
| IBM_BIOS_MODULE_ALIAS ("I[MU]") |
|
| MODULE_AUTHOR ("Borislav Deianov <[email protected]>") |
|
| MODULE_AUTHOR ("Henrique de Moraes Holschuh <[email protected]>") |
|
| MODULE_DESCRIPTION (TPACPI_DESC) |
|
| MODULE_VERSION (TPACPI_VERSION) |
|
| MODULE_LICENSE ("GPL") |
|
| module_init (thinkpad_acpi_module_init) |
|
| module_exit (thinkpad_acpi_module_exit) |
|