Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
thinkpad_acpi.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/nvram.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/sysfs.h>
#include <linux/backlight.h>
#include <linux/fb.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/input.h>
#include <linux/leds.h>
#include <linux/rfkill.h>
#include <asm/uaccess.h>
#include <linux/dmi.h>
#include <linux/jiffies.h>
#include <linux/workqueue.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/initval.h>
#include <acpi/acpi_drivers.h>
#include <linux/pci_ids.h>

Go to the source code of this file.

Data Structures

struct  tp_acpi_drv_struct
 
struct  ibm_struct
 
struct  ibm_init_struct
 
struct  thinkpad_id_data
 
struct  tpacpi_led_classdev
 
struct  tpacpi_quirk
 
struct  attribute_set
 
struct  attribute_set_obj
 
struct  tpacpi_rfk
 
struct  tpacpi_rfk_ops
 
struct  ibm_thermal_sensors_struct
 

Macros

#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*")
 

Typedefs

typedef u16 tpacpi_keymap_entry_t
 
typedef tpacpi_keymap_entry_t tpacpi_keymap_t [TPACPI_HOTKEY_MAP_LEN]
 

Enumerations

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_HOTKEYSCAN_UNK1, TP_ACPI_HOTKEYSCAN_UNK2, TP_ACPI_HOTKEYSCAN_UNK3, TP_ACPI_HOTKEYSCAN_UNK4,
  TP_ACPI_HOTKEYSCAN_UNK5, TP_ACPI_HOTKEYSCAN_UNK6, TP_ACPI_HOTKEYSCAN_UNK7, TP_ACPI_HOTKEYSCAN_UNK8,
  TPACPI_HOTKEY_MAP_LEN
}
 
enum  { TPACPI_HKEY_NVRAM_KNOWN_MASK = 0x00fb88c0U, TPACPI_HKEY_NVRAM_GOOD_MASK = 0x00fb8000U }
 
enum  {
  TP_ACPI_HKEY_DISPSWTCH_MASK = 1 << TP_ACPI_HOTKEYSCAN_FNF7, TP_ACPI_HKEY_DISPXPAND_MASK = 1 << TP_ACPI_HOTKEYSCAN_FNF8, TP_ACPI_HKEY_HIBERNATE_MASK = 1 << TP_ACPI_HOTKEYSCAN_FNF12, TP_ACPI_HKEY_BRGHTUP_MASK = 1 << TP_ACPI_HOTKEYSCAN_FNHOME,
  TP_ACPI_HKEY_BRGHTDWN_MASK = 1 << TP_ACPI_HOTKEYSCAN_FNEND, TP_ACPI_HKEY_THNKLGHT_MASK = 1 << TP_ACPI_HOTKEYSCAN_FNPAGEUP, TP_ACPI_HKEY_ZOOM_MASK = 1 << TP_ACPI_HOTKEYSCAN_FNSPACE, TP_ACPI_HKEY_VOLUP_MASK = 1 << TP_ACPI_HOTKEYSCAN_VOLUMEUP,
  TP_ACPI_HKEY_VOLDWN_MASK = 1 << TP_ACPI_HOTKEYSCAN_VOLUMEDOWN, TP_ACPI_HKEY_MUTE_MASK = 1 << TP_ACPI_HOTKEYSCAN_MUTE, TP_ACPI_HKEY_THINKPAD_MASK = 1 << TP_ACPI_HOTKEYSCAN_THINKPAD
}
 
enum  { TP_NVRAM_HKEY_GROUP_HK2, TP_NVRAM_HKEY_GROUP_BRIGHTNESS, TP_NVRAM_HKEY_GROUP_VOLUME }
 
enum  { TP_ACPI_WAKEUP_NONE = 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 }
 

Functions

 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)
 

Variables

struct attribute_set s
 
struct attributea
 
enum tpacpi_rfkill_state __attribute__
 

Macro Definition Documentation

#define alsa_card   NULL

Definition at line 7098 of file thinkpad_acpi.c.

#define dbg_printk (   a_dbg_level,
  format,
  arg... 
)
Value:
do { \
if (dbg_level & (a_dbg_level)) \
printk(KERN_DEBUG pr_fmt("%s: " format), \
__func__, ##arg); \
} while (0)

Definition at line 395 of file thinkpad_acpi.c.

#define destroy_attr_set (   _set)    kfree(_set);

Definition at line 1021 of file thinkpad_acpi.c.

#define enabled (   status,
  bit 
)    ((status) & (1 << (bit)) ? "enabled" : "disabled")

Definition at line 253 of file thinkpad_acpi.c.

#define HOTKEY_CONFIG_CRITICAL_END

Definition at line 2008 of file thinkpad_acpi.c.

#define HOTKEY_CONFIG_CRITICAL_START

Definition at line 2007 of file thinkpad_acpi.c.

#define hotkey_source_mask   0U

Definition at line 2006 of file thinkpad_acpi.c.

#define IBM_BIOS_MODULE_ALIAS (   __type)    MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*")

Definition at line 9152 of file thinkpad_acpi.c.

#define onoff (   status,
  bit 
)    ((status) & (1 << (bit)) ? "on" : "off")

Definition at line 252 of file thinkpad_acpi.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 24 of file thinkpad_acpi.c.

#define register_attr_set_with_sysfs (   _attr_set,
  _kobj 
)    sysfs_create_group(_kobj, &_attr_set->group)

Definition at line 1060 of file thinkpad_acpi.c.

#define str_led_status (   s)
Value:
((s) == TPACPI_LED_OFF ? "off" : \
((s) == TPACPI_LED_ON ? "on" : "blinking"))

Definition at line 5370 of file thinkpad_acpi.c.

#define strlencmp (   a,
  b 
)    (strncmp((a), (b), strlen(b)))

Definition at line 254 of file thinkpad_acpi.c.

#define THERMAL_ATTRS (   X)    &sensor_dev_attr_thermal_temp_input[X].dev_attr.attr

Definition at line 5691 of file thinkpad_acpi.c.

#define THERMAL_SENSOR_ATTR_TEMP (   _idxA,
  _idxB 
)
Value:
SENSOR_ATTR(temp##_idxA##_input, S_IRUGO, \
thermal_temp_input_show, NULL, _idxB)

Definition at line 5668 of file thinkpad_acpi.c.

#define TP_CMOS_BRIGHTNESS_DOWN   5

Definition at line 97 of file thinkpad_acpi.c.

#define TP_CMOS_BRIGHTNESS_UP   4

Definition at line 96 of file thinkpad_acpi.c.

#define TP_CMOS_THINKLIGHT_OFF   13

Definition at line 99 of file thinkpad_acpi.c.

#define TP_CMOS_THINKLIGHT_ON   12

Definition at line 98 of file thinkpad_acpi.c.

#define TP_CMOS_VOLUME_DOWN   0

Definition at line 93 of file thinkpad_acpi.c.

#define TP_CMOS_VOLUME_MUTE   2

Definition at line 95 of file thinkpad_acpi.c.

#define TP_CMOS_VOLUME_UP   1

Definition at line 94 of file thinkpad_acpi.c.

#define TP_HOTKEY_TABLET_MASK   (1 << 3)

Definition at line 2040 of file thinkpad_acpi.c.

#define TPACPI_ACPI_EC_HID   "PNP0C09"

Definition at line 135 of file thinkpad_acpi.c.

#define TPACPI_ACPI_EVENT_PREFIX   "ibm"

Definition at line 231 of file thinkpad_acpi.c.

#define TPACPI_ACPI_IBM_HKEY_HID   "IBM0068"

Definition at line 133 of file thinkpad_acpi.c.

#define TPACPI_ACPI_LENOVO_HKEY_HID   "LEN0068"

Definition at line 134 of file thinkpad_acpi.c.

#define TPACPI_ACPIHANDLE_INIT (   object)
Value:
drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \
object##_paths, ARRAY_SIZE(object##_paths))

Definition at line 672 of file thinkpad_acpi.c.

#define TPACPI_BACKLIGHT_DEV_NAME   "thinkpad_screen"

Definition at line 5869 of file thinkpad_acpi.c.

#define TPACPI_BEEP_Q1   0x0001

Definition at line 5444 of file thinkpad_acpi.c.

#define TPACPI_BRGHT_Q_ASK   0x8000 /* Ask for user report */

Definition at line 6161 of file thinkpad_acpi.c.

#define TPACPI_BRGHT_Q_EC   0x0002 /* Should or must use EC HBRV */

Definition at line 6160 of file thinkpad_acpi.c.

#define TPACPI_BRGHT_Q_NOEC   0x0001 /* Must NOT use EC HBRV */

Definition at line 6159 of file thinkpad_acpi.c.

#define TPACPI_DBG_ALL   0xffff

Definition at line 242 of file thinkpad_acpi.c.

#define TPACPI_DBG_BRGHT   0x0020

Definition at line 249 of file thinkpad_acpi.c.

#define TPACPI_DBG_DISCLOSETASK   0x8000

Definition at line 243 of file thinkpad_acpi.c.

#define TPACPI_DBG_EXIT   0x0002

Definition at line 245 of file thinkpad_acpi.c.

#define TPACPI_DBG_FAN   0x0010

Definition at line 248 of file thinkpad_acpi.c.

#define TPACPI_DBG_HKEY   0x0008

Definition at line 247 of file thinkpad_acpi.c.

#define TPACPI_DBG_INIT   0x0001

Definition at line 244 of file thinkpad_acpi.c.

#define TPACPI_DBG_MIXER   0x0040

Definition at line 250 of file thinkpad_acpi.c.

#define TPACPI_DBG_RFKILL   0x0004

Definition at line 246 of file thinkpad_acpi.c.

#define TPACPI_DESC   "ThinkPad ACPI Extras"

Definition at line 225 of file thinkpad_acpi.c.

#define tpacpi_disclose_usertask (   what,
  format,
  arg... 
)
Value:
do { \
if (unlikely((dbg_level & TPACPI_DBG_DISCLOSETASK) && \
(tpacpi_lifecycle == TPACPI_LIFE_RUNNING))) { \
printk(KERN_DEBUG pr_fmt("%s: PID %d: " format), \
what, task_tgid_vnr(current), ## arg); \
} \
} while (0)

Definition at line 417 of file thinkpad_acpi.c.

#define TPACPI_DRVR_NAME   TPACPI_FILE

Definition at line 232 of file thinkpad_acpi.c.

#define TPACPI_DRVR_SHORTNAME   "tpacpi"

Definition at line 233 of file thinkpad_acpi.c.

#define TPACPI_FAN_2FAN   0x0002 /* EC 0x31 bit 0 selects fan2 */

Definition at line 7946 of file thinkpad_acpi.c.

#define TPACPI_FAN_Q1   0x0001 /* Unitialized HFSP */

Definition at line 7945 of file thinkpad_acpi.c.

#define TPACPI_FAN_QI (   __id1,
  __id2,
  __quirks 
)
Value:
{ .vendor = PCI_VENDOR_ID_IBM, \
.bios = TPACPI_MATCH_ANY, \
.ec = TPID(__id1, __id2), \
.quirks = __quirks }

Definition at line 7948 of file thinkpad_acpi.c.

#define TPACPI_FAN_QL (   __id1,
  __id2,
  __quirks 
)
Value:
{ .vendor = PCI_VENDOR_ID_LENOVO, \
.bios = TPACPI_MATCH_ANY, \
.ec = TPID(__id1, __id2), \
.quirks = __quirks }

Definition at line 7954 of file thinkpad_acpi.c.

#define TPACPI_FILE   TPACPI_NAME "_acpi"

Definition at line 226 of file thinkpad_acpi.c.

#define TPACPI_HANDLE (   object,
  parent,
  paths... 
)
Value:
static acpi_handle object##_handle; \
static const acpi_handle * const object##_parent __initconst = \
&parent##_handle; \
static char *object##_paths[] __initdata = { paths }

Definition at line 523 of file thinkpad_acpi.c.

#define TPACPI_HK_Q_INIMASK   0x0001

Definition at line 3045 of file thinkpad_acpi.c.

#define TPACPI_HKEY_INPUT_PRODUCT   0x5054 /* "TP" */

Definition at line 138 of file thinkpad_acpi.c.

#define TPACPI_HKEY_INPUT_VERSION   0x4101

Definition at line 139 of file thinkpad_acpi.c.

#define TPACPI_HOTKEY_MAP_SIZE   sizeof(tpacpi_keymap_t)
#define TPACPI_HOTKEY_MAP_TYPESIZE   sizeof(tpacpi_keymap_entry_t)
#define TPACPI_HWMON_DRVR_NAME   TPACPI_NAME "_hwmon"

Definition at line 234 of file thinkpad_acpi.c.

#define TPACPI_LED_NUMLEDS   16

Definition at line 5041 of file thinkpad_acpi.c.

#define TPACPI_MAIL   "[email protected]"

Definition at line 228 of file thinkpad_acpi.c.

#define TPACPI_MATCH_ANY   0xffffU

Definition at line 435 of file thinkpad_acpi.c.

#define TPACPI_MATCH_UNKNOWN   0U

Definition at line 436 of file thinkpad_acpi.c.

#define TPACPI_MAX_ACPI_ARGS   3

Definition at line 239 of file thinkpad_acpi.c.

#define TPACPI_MAX_THERMAL_SENSORS   16 /* Max thermal sensors supported */

Definition at line 5537 of file thinkpad_acpi.c.

#define TPACPI_NAME   "thinkpad"

Definition at line 224 of file thinkpad_acpi.c.

#define TPACPI_NVRAM_KTHREAD_NAME   "ktpacpi_nvramd"

Definition at line 236 of file thinkpad_acpi.c.

#define TPACPI_PARAM (   feature)
Value:
module_param_call(feature, set_ibm_param, NULL, NULL, 0); \
MODULE_PARM_DESC(feature, "Simulates thinkpad-acpi procfs command " \
"at module load, see documentation")

Definition at line 8877 of file thinkpad_acpi.c.

#define TPACPI_PROC_DIR   "ibm"

Definition at line 230 of file thinkpad_acpi.c.

#define TPACPI_Q_IBM (   __id1,
  __id2,
  __quirk 
)
Value:
{ .vendor = PCI_VENDOR_ID_IBM, \
.bios = TPID(__id1, __id2), \
.quirks = (__quirk) }

Definition at line 441 of file thinkpad_acpi.c.

#define TPACPI_Q_LNV (   __id1,
  __id2,
  __quirk 
)
Value:
{ .vendor = PCI_VENDOR_ID_LENOVO, \
.bios = TPID(__id1, __id2), \
.quirks = (__quirk) }

Definition at line 447 of file thinkpad_acpi.c.

#define TPACPI_QEC_LNV (   __id1,
  __id2,
  __quirk 
)
Value:
{ .vendor = PCI_VENDOR_ID_LENOVO, \
.bios = TPACPI_MATCH_ANY, \
.ec = TPID(__id1, __id2), \
.quirks = (__quirk) }

Definition at line 453 of file thinkpad_acpi.c.

#define TPACPI_RFK_BLUETOOTH_SW_NAME   "tpacpi_bluetooth_sw"

Definition at line 3917 of file thinkpad_acpi.c.

#define TPACPI_RFK_UWB_SW_NAME   "tpacpi_uwb_sw"

Definition at line 4294 of file thinkpad_acpi.c.

#define TPACPI_RFK_WWAN_SW_NAME   "tpacpi_wwan_sw"

Definition at line 4107 of file thinkpad_acpi.c.

#define TPACPI_SAFE_LEDS   0x1081U

Definition at line 5060 of file thinkpad_acpi.c.

#define TPACPI_SYSFS_VERSION   0x020700

Definition at line 27 of file thinkpad_acpi.c.

#define TPACPI_URL   "http://ibm-acpi.sf.net/"

Definition at line 227 of file thinkpad_acpi.c.

#define TPACPI_VERSION   "0.24"

Definition at line 26 of file thinkpad_acpi.c.

#define TPACPI_WORKQUEUE_NAME   "ktpacpid"

Definition at line 237 of file thinkpad_acpi.c.

#define TPID (   __c1,
  __c2 
)    (((__c2) << 8) | (__c1))

Definition at line 439 of file thinkpad_acpi.c.

#define TPV_Q (   __v,
  __id1,
  __id2,
  __bv1,
  __bv2 
)
Value:
{ .vendor = (__v), \
.bios = TPID(__id1, __id2), \
.quirks = TPACPI_MATCH_ANY << 16 \
| (__bv1) << 8 | (__bv2) }

Definition at line 1655 of file thinkpad_acpi.c.

#define TPV_Q_X (   __v,
  __bid1,
  __bid2,
  __bv1,
  __bv2,
  __eid,
  __ev1,
  __ev2 
)
Value:
{ .vendor = (__v), \
.bios = TPID(__bid1, __bid2), \
.ec = __eid, \
.quirks = (__ev1) << 24 | (__ev2) << 16 \
| (__bv1) << 8 | (__bv2) }

Definition at line 1662 of file thinkpad_acpi.c.

#define TPV_QI0 (   __id1,
  __id2,
  __bv1,
  __bv2 
)    TPV_Q(PCI_VENDOR_ID_IBM, __id1, __id2, __bv1, __bv2)

Definition at line 1670 of file thinkpad_acpi.c.

#define TPV_QI1 (   __id1,
  __id2,
  __bv1,
  __bv2,
  __ev1,
  __ev2 
)
Value:
TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, \
__bv1, __bv2, TPID(__id1, __id2), \
__ev1, __ev2), \
TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, \
__bv1, __bv2, TPACPI_MATCH_UNKNOWN, \
__ev1, __ev2)

Definition at line 1674 of file thinkpad_acpi.c.

#define TPV_QI2 (   __bid1,
  __bid2,
  __bv1,
  __bv2,
  __eid1,
  __eid2,
  __ev1,
  __ev2 
)
Value:
TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, \
__bv1, __bv2, TPID(__eid1, __eid2), \
__ev1, __ev2), \
TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, \
__bv1, __bv2, TPACPI_MATCH_UNKNOWN, \
__ev1, __ev2)

Definition at line 1683 of file thinkpad_acpi.c.

#define TPV_QL0 (   __id1,
  __id2,
  __bv1,
  __bv2 
)    TPV_Q(PCI_VENDOR_ID_LENOVO, __id1, __id2, __bv1, __bv2)

Definition at line 1692 of file thinkpad_acpi.c.

#define TPV_QL1 (   __id1,
  __id2,
  __bv1,
  __bv2,
  __ev1,
  __ev2 
)
Value:
TPV_Q_X(PCI_VENDOR_ID_LENOVO, __id1, __id2, \
__bv1, __bv2, TPID(__id1, __id2), \
__ev1, __ev2)

Definition at line 1695 of file thinkpad_acpi.c.

#define TPV_QL2 (   __bid1,
  __bid2,
  __bv1,
  __bv2,
  __eid1,
  __eid2,
  __ev1,
  __ev2 
)
Value:
TPV_Q_X(PCI_VENDOR_ID_LENOVO, __bid1, __bid2, \
__bv1, __bv2, TPID(__eid1, __eid2), \
__ev1, __ev2)

Definition at line 1700 of file thinkpad_acpi.c.

#define vdbg_printk (   a_dbg_level,
  format,
  arg... 
)    no_printk(format, ##arg)

Definition at line 407 of file thinkpad_acpi.c.

Typedef Documentation

Definition at line 3069 of file thinkpad_acpi.c.

typedef tpacpi_keymap_entry_t tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN]

Definition at line 3070 of file thinkpad_acpi.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
TP_NVRAM_MASK_HKT_THINKPAD 
TP_NVRAM_MASK_HKT_ZOOM 
TP_NVRAM_MASK_HKT_DISPLAY 
TP_NVRAM_MASK_HKT_HIBERNATE 
TP_NVRAM_MASK_THINKLIGHT 
TP_NVRAM_MASK_HKT_DISPEXPND 
TP_NVRAM_MASK_HKT_BRIGHTNESS 
TP_NVRAM_MASK_LEVEL_BRIGHTNESS 
TP_NVRAM_POS_LEVEL_BRIGHTNESS 
TP_NVRAM_MASK_MUTE 
TP_NVRAM_MASK_HKT_VOLUME 
TP_NVRAM_MASK_LEVEL_VOLUME 
TP_NVRAM_POS_LEVEL_VOLUME 

Definition at line 111 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_NVRAM_LEVEL_VOLUME_MAX 

Definition at line 128 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_WGSV_GET_STATE 
TP_ACPI_WGSV_PWR_ON_ON_RESUME 
TP_ACPI_WGSV_PWR_OFF_ON_RESUME 
TP_ACPI_WGSV_SAVE_STATE 

Definition at line 142 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_WGSV_STATE_WWANEXIST 
TP_ACPI_WGSV_STATE_WWANPWR 
TP_ACPI_WGSV_STATE_WWANPWRRES 
TP_ACPI_WGSV_STATE_WWANBIOSOFF 
TP_ACPI_WGSV_STATE_BLTHEXIST 
TP_ACPI_WGSV_STATE_BLTHPWR 
TP_ACPI_WGSV_STATE_BLTHPWRRES 
TP_ACPI_WGSV_STATE_BLTHBIOSOFF 
TP_ACPI_WGSV_STATE_UWBEXIST 
TP_ACPI_WGSV_STATE_UWBPWR 

Definition at line 150 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TPACPI_LIFE_INIT 
TPACPI_LIFE_RUNNING 
TPACPI_LIFE_EXITING 

Definition at line 351 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_HOTKEYSCAN_FNF1 
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_HOTKEYSCAN_UNK1 
TP_ACPI_HOTKEYSCAN_UNK2 
TP_ACPI_HOTKEYSCAN_UNK3 
TP_ACPI_HOTKEYSCAN_UNK4 
TP_ACPI_HOTKEYSCAN_UNK5 
TP_ACPI_HOTKEYSCAN_UNK6 
TP_ACPI_HOTKEYSCAN_UNK7 
TP_ACPI_HOTKEYSCAN_UNK8 
TPACPI_HOTKEY_MAP_LEN 

Definition at line 1879 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TPACPI_HKEY_NVRAM_KNOWN_MASK 
TPACPI_HKEY_NVRAM_GOOD_MASK 

Definition at line 1917 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_HKEY_DISPSWTCH_MASK 
TP_ACPI_HKEY_DISPXPAND_MASK 
TP_ACPI_HKEY_HIBERNATE_MASK 
TP_ACPI_HKEY_BRGHTUP_MASK 
TP_ACPI_HKEY_BRGHTDWN_MASK 
TP_ACPI_HKEY_THNKLGHT_MASK 
TP_ACPI_HKEY_ZOOM_MASK 
TP_ACPI_HKEY_VOLUP_MASK 
TP_ACPI_HKEY_VOLDWN_MASK 
TP_ACPI_HKEY_MUTE_MASK 
TP_ACPI_HKEY_THINKPAD_MASK 

Definition at line 1922 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_NVRAM_HKEY_GROUP_HK2 
TP_NVRAM_HKEY_GROUP_BRIGHTNESS 
TP_NVRAM_HKEY_GROUP_VOLUME 

Definition at line 1936 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_WAKEUP_NONE 
TP_ACPI_WAKEUP_BAYEJ 
TP_ACPI_WAKEUP_UNDOCK 

Definition at line 2014 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_BLUETOOTH_HWPRESENT 
TP_ACPI_BLUETOOTH_RADIOSSW 
TP_ACPI_BLUETOOTH_RESUMECTRL 

Definition at line 3900 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_BLTH_GET_ULTRAPORT_ID 
TP_ACPI_BLTH_GET_PWR_ON_RESUME 
TP_ACPI_BLTH_PWR_ON_ON_RESUME 
TP_ACPI_BLTH_PWR_OFF_ON_RESUME 
TP_ACPI_BLTH_SAVE_STATE 

Definition at line 3908 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_WANCARD_HWPRESENT 
TP_ACPI_WANCARD_RADIOSSW 
TP_ACPI_WANCARD_RESUMECTRL 

Definition at line 4099 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_ACPI_UWB_HWPRESENT 
TP_ACPI_UWB_RADIOSSW 

Definition at line 4288 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TPACPI_LED_EC_HLCL 
TPACPI_LED_EC_HLBL 
TPACPI_LED_EC_HLMS 

Definition at line 5031 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_EC_THERMAL_TMP0 
TP_EC_THERMAL_TMP8 
TP_EC_THERMAL_TMP_NA 
TPACPI_THERMAL_SENSOR_NA 

Definition at line 5528 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
TP_EC_BACKLIGHT 
TP_EC_BACKLIGHT_LVLMSK 
TP_EC_BACKLIGHT_CMDMSK 
TP_EC_BACKLIGHT_MAPSW 

Definition at line 5889 of file thinkpad_acpi.c.

anonymous enum
Enumerator:
fan_status_offset 
fan_rpm_offset 
fan_select_offset 
TP_EC_FAN_FULLSPEED 
TP_EC_FAN_AUTO 
TPACPI_FAN_LAST_LEVEL 

Definition at line 7237 of file thinkpad_acpi.c.

Enumerator:
TPACPI_FAN_WR_NONE 
TPACPI_FAN_WR_ACPI_SFAN 
TPACPI_FAN_WR_TPEC 
TPACPI_FAN_WR_ACPI_FANS 

Definition at line 7256 of file thinkpad_acpi.c.

Enumerator:
TPACPI_FAN_CMD_SPEED 
TPACPI_FAN_CMD_LEVEL 
TPACPI_FAN_CMD_ENABLE 

Definition at line 7263 of file thinkpad_acpi.c.

Enumerator:
TPACPI_FAN_NONE 
TPACPI_FAN_RD_ACPI_GFAN 
TPACPI_FAN_RD_TPEC 

Definition at line 7250 of file thinkpad_acpi.c.

Enumerator:
TPACPI_LED_NONE 
TPACPI_LED_570 
TPACPI_LED_OLD 
TPACPI_LED_NEW 

Definition at line 5024 of file thinkpad_acpi.c.

Enumerator:
TPACPI_LED_OFF 
TPACPI_LED_ON 
TPACPI_LED_BLINK 

Definition at line 362 of file thinkpad_acpi.c.

Enumerator:
TPACPI_THERMAL_NONE 
TPACPI_THERMAL_ACPI_TMP07 
TPACPI_THERMAL_ACPI_UPDT 
TPACPI_THERMAL_TPEC_8 
TPACPI_THERMAL_TPEC_16 

Definition at line 5520 of file thinkpad_acpi.c.

Enumerator:
TP_NVRAM_ADDR_HK2 
TP_NVRAM_ADDR_THINKLIGHT 
TP_NVRAM_ADDR_VIDEO 
TP_NVRAM_ADDR_BRIGHTNESS 
TP_NVRAM_ADDR_MIXER 

Definition at line 102 of file thinkpad_acpi.c.

Enumerator:
TPACPI_BRGHT_MODE_AUTO 
TPACPI_BRGHT_MODE_EC 
TPACPI_BRGHT_MODE_UCMS_STEP 
TPACPI_BRGHT_MODE_ECNVRAM 
TPACPI_BRGHT_MODE_MAX 

Definition at line 5898 of file thinkpad_acpi.c.

Enumerator:
TP_HKEY_EV_HOTKEY_BASE 
TP_HKEY_EV_BRGHT_UP 
TP_HKEY_EV_BRGHT_DOWN 
TP_HKEY_EV_VOL_UP 
TP_HKEY_EV_VOL_DOWN 
TP_HKEY_EV_VOL_MUTE 
TP_HKEY_EV_WKUP_S3_UNDOCK 
TP_HKEY_EV_WKUP_S4_UNDOCK 
TP_HKEY_EV_WKUP_S3_BAYEJ 
TP_HKEY_EV_WKUP_S4_BAYEJ 
TP_HKEY_EV_WKUP_S3_BATLOW 
TP_HKEY_EV_WKUP_S4_BATLOW 
TP_HKEY_EV_BAYEJ_ACK 
TP_HKEY_EV_UNDOCK_ACK 
TP_HKEY_EV_OPTDRV_EJ 
TP_HKEY_EV_HOTPLUG_DOCK 
TP_HKEY_EV_HOTPLUG_UNDOCK 
TP_HKEY_EV_LID_CLOSE 
TP_HKEY_EV_LID_OPEN 
TP_HKEY_EV_TABLET_TABLET 
TP_HKEY_EV_TABLET_NOTEBOOK 
TP_HKEY_EV_PEN_INSERTED 
TP_HKEY_EV_PEN_REMOVED 
TP_HKEY_EV_BRGHT_CHANGED 
TP_HKEY_EV_KEY_NUMLOCK 
TP_HKEY_EV_KEY_FN 
TP_HKEY_EV_ALARM_BAT_HOT 
TP_HKEY_EV_ALARM_BAT_XHOT 
TP_HKEY_EV_ALARM_SENSOR_HOT 
TP_HKEY_EV_ALARM_SENSOR_XHOT 
TP_HKEY_EV_THM_TABLE_CHANGED 
TP_HKEY_EV_UNK_6040 
TP_HKEY_EV_RFKILL_CHANGED 

Definition at line 164 of file thinkpad_acpi.c.

Enumerator:
TPACPI_RFK_BLUETOOTH_SW_ID 
TPACPI_RFK_WWAN_SW_ID 
TPACPI_RFK_UWB_SW_ID 
TPACPI_RFK_SW_MAX 

Definition at line 1121 of file thinkpad_acpi.c.

Enumerator:
TPACPI_RFK_RADIO_OFF 
TPACPI_RFK_RADIO_ON 

Definition at line 1115 of file thinkpad_acpi.c.

Function Documentation

struct attribute_set_obj __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

IBM_BIOS_MODULE_ALIAS ( "I"  [MU])
MODULE_ALIAS ( TPACPI_DRVR_SHORTNAME  )
MODULE_AUTHOR ( "Borislav Deianov <[email protected]>"  )
MODULE_AUTHOR ( "Henrique de Moraes Holschuh <[email protected]>"  )
MODULE_DESCRIPTION ( TPACPI_DESC  )
MODULE_DEVICE_TABLE ( acpi  ,
ibm_htk_device_ids   
)
module_exit ( thinkpad_acpi_module_exit  )
module_init ( thinkpad_acpi_module_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( experimental  ,
int  ,
0444   
)
module_param ( force_load  ,
bool  ,
0444   
)
module_param ( brightness_enable  ,
uint  ,
0444   
)
module_param ( hotkey_report_mode  ,
uint  ,
0444   
)
module_param_named ( debug  ,
dbg_level  ,
uint  ,
 
)
module_param_named ( fan_control  ,
fan_control_allowed  ,
bool  ,
0444   
)
module_param_named ( brightness_mode  ,
brightness_mode  ,
uint  ,
0444   
)
MODULE_PARM_DESC ( experimental  ,
"Enables experimental features when non-zero  
)
MODULE_PARM_DESC ( debug  ,
"Sets debug level bit-mask  
)
MODULE_PARM_DESC ( force_load  ,
"Attempts to load the driver even on a ""mis-identified ThinkPad when true  
)
MODULE_PARM_DESC ( fan_control  ,
"Enables setting fan parameters features when true  
)
MODULE_PARM_DESC ( brightness_mode  ,
"Selects brightness control strategy: ""  0 = auto,
= EC,
= UCMS 
)
MODULE_PARM_DESC ( brightness_enable  ,
"Enables backlight control when  1,
disables when 0"   
)
MODULE_PARM_DESC ( hotkey_report_mode  ,
"used for backwards compatibility with  userspace,
""see documentation"   
)
MODULE_VERSION ( TPACPI_VERSION  )
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"   
)
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"   
)
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  )

Variable Documentation

Definition at line 1000 of file thinkpad_acpi.c.

u32 beep_needs_two_args

Definition at line 318 of file thinkpad_acpi.c.

u32 bluetooth

Definition at line 305 of file thinkpad_acpi.c.

u32 bright_acpimode

Definition at line 312 of file thinkpad_acpi.c.

u32 bright_unkfw

Definition at line 313 of file thinkpad_acpi.c.

u32 fan_ctrl_status_undef

Definition at line 316 of file thinkpad_acpi.c.

u32 hotkey

Definition at line 306 of file thinkpad_acpi.c.

u32 hotkey_mask

Definition at line 307 of file thinkpad_acpi.c.

u16 hotkey_mask_ff

Definition at line 330 of file thinkpad_acpi.c.

u32 hotkey_poll_active

Definition at line 326 of file thinkpad_acpi.c.

u32 hotkey_tablet

Definition at line 309 of file thinkpad_acpi.c.

u32 hotkey_wlsw

Definition at line 308 of file thinkpad_acpi.c.

u32 input_device_registered

Definition at line 320 of file thinkpad_acpi.c.

u32 light

Definition at line 310 of file thinkpad_acpi.c.

u32 light_status

Definition at line 311 of file thinkpad_acpi.c.

u32 mixer_no_level_control

Definition at line 319 of file thinkpad_acpi.c.

u32 platform_drv_attrs_registered

Definition at line 322 of file thinkpad_acpi.c.

u32 platform_drv_registered

Definition at line 321 of file thinkpad_acpi.c.

Definition at line 999 of file thinkpad_acpi.c.

u32 second_fan

Definition at line 317 of file thinkpad_acpi.c.

u32 sensors_pdev_attrs_registered

Definition at line 325 of file thinkpad_acpi.c.

u32 sensors_pdrv_attrs_registered

Definition at line 324 of file thinkpad_acpi.c.

u32 sensors_pdrv_registered

Definition at line 323 of file thinkpad_acpi.c.

u32 uwb

Definition at line 315 of file thinkpad_acpi.c.

u16 volume_ctrl_forbidden

Definition at line 331 of file thinkpad_acpi.c.

u32 wan

Definition at line 314 of file thinkpad_acpi.c.