Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
smu.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  smu_sdbp_header
 
struct  smu_sdbp_fvt
 
struct  smu_sdbp_cpuvcp
 
struct  smu_sdbp_cpudiode
 
struct  smu_sdbp_slotspow
 
struct  smu_sdbp_sensortree
 
struct  smu_sdbp_cpupiddata
 
struct  smu_user_cmd_hdr
 
struct  smu_user_reply_hdr
 

Macros

#define SMU_CMD_PARTITION_COMMAND   0x3e
 
#define SMU_CMD_PARTITION_LATEST   0x01
 
#define SMU_CMD_PARTITION_BASE   0x02
 
#define SMU_CMD_PARTITION_UPDATE   0x03
 
#define SMU_CMD_FAN_COMMAND   0x4a
 
#define SMU_CMD_BATTERY_COMMAND   0x6f
 
#define SMU_CMD_GET_BATTERY_INFO   0x00
 
#define SMU_CMD_RTC_COMMAND   0x8e
 
#define SMU_CMD_RTC_SET_PWRUP_TIMER   0x00 /* i: 7 bytes date */
 
#define SMU_CMD_RTC_GET_PWRUP_TIMER   0x01 /* o: 7 bytes date */
 
#define SMU_CMD_RTC_STOP_PWRUP_TIMER   0x02
 
#define SMU_CMD_RTC_SET_PRAM_BYTE_ACC   0x20 /* i: 1 byte (address?) */
 
#define SMU_CMD_RTC_SET_PRAM_AUTOINC   0x21 /* i: 1 byte (data?) */
 
#define SMU_CMD_RTC_SET_PRAM_LO_BYTES   0x22 /* i: 10 bytes */
 
#define SMU_CMD_RTC_SET_PRAM_HI_BYTES   0x23 /* i: 10 bytes */
 
#define SMU_CMD_RTC_GET_PRAM_BYTE   0x28 /* i: 1 bytes (address?) */
 
#define SMU_CMD_RTC_GET_PRAM_LO_BYTES   0x29 /* o: 10 bytes */
 
#define SMU_CMD_RTC_GET_PRAM_HI_BYTES   0x2a /* o: 10 bytes */
 
#define SMU_CMD_RTC_SET_DATETIME   0x80 /* i: 7 bytes date */
 
#define SMU_CMD_RTC_GET_DATETIME   0x81 /* o: 7 bytes date */
 
#define SMU_CMD_I2C_COMMAND   0x9a
 
#define SMU_I2C_TRANSFER_SIMPLE   0x00
 
#define SMU_I2C_TRANSFER_STDSUB   0x01
 
#define SMU_I2C_TRANSFER_COMBINED   0x02
 
#define SMU_CMD_POWER_COMMAND   0xaa
 
#define SMU_CMD_POWER_RESTART   "RESTART"
 
#define SMU_CMD_POWER_SHUTDOWN   "SHUTDOWN"
 
#define SMU_CMD_POWER_VOLTAGE_SLEW   "VSLEW"
 
#define SMU_CMD_READ_ADC   0xd8
 
#define SMU_CMD_MISC_df_COMMAND   0xdf
 
#define SMU_CMD_MISC_df_SET_DISPLAY_LIT   0x02
 
#define SMU_CMD_MISC_df_NMI_OPTION   0x04
 
#define SMU_CMD_MISC_df_DIMM_OFFSET   0x99
 
#define SMU_CMD_VERSION_COMMAND   0xea
 
#define SMU_VERSION_RUNNING   0x00
 
#define SMU_VERSION_BASE   0x01
 
#define SMU_VERSION_UPDATE   0x02
 
#define SMU_CMD_SWITCHES   0xdc
 
#define SMU_SWITCH_CASE_CLOSED   0x01
 
#define SMU_SWITCH_AC_POWER   0x04
 
#define SMU_SWITCH_POWER_SWITCH   0x08
 
#define SMU_CMD_MISC_ee_COMMAND   0xee
 
#define SMU_CMD_MISC_ee_GET_DATABLOCK_REC   0x02
 
#define SMU_CMD_MISC_ee_GET_WATTS   0x03
 
#define SMU_CMD_MISC_ee_LEDS_CTRL   0x04 /* i: 00 (00,01) [00] */
 
#define SMU_CMD_MISC_ee_GET_DATA   0x05 /* i: 00 , o: ?? */
 
#define SMU_CMD_POWER_EVENTS_COMMAND   0x8f
 
#define SMU_U16_MIX(x)   le16_to_cpu(x)
 
#define SMU_U32_MIX(x)   ((((x) & 0xff00ff00u) >> 8)|(((x) & 0x00ff00ffu) << 8))
 
#define SMU_SDB_FVT_ID   0x12
 
#define SMU_SDB_CPUVCP_ID   0x21
 
#define SMU_SDB_CPUDIODE_ID   0x18
 
#define SMU_SDB_SLOTSPOW_ID   0x78
 
#define SMU_SDB_SENSORTREE_ID   0x25
 
#define SMU_SDB_CPUPIDDATA_ID   0x17
 
#define SMU_SDB_DEBUG_SWITCHES_ID   0x05
 
#define SMU_CMDTYPE_SMU   0 /* SMU command */
 
#define SMU_CMDTYPE_WANTS_EVENTS   1 /* switch fd to events mode */
 
#define SMU_CMDTYPE_GET_PARTITION   2 /* retrieve an sdb partition */
 

Enumerations

enum  {
  SMU_PWR_GET_POWERUP_EVENTS = 0x00, SMU_PWR_SET_POWERUP_EVENTS = 0x01, SMU_PWR_CLR_POWERUP_EVENTS = 0x02, SMU_PWR_GET_WAKEUP_EVENTS = 0x03,
  SMU_PWR_SET_WAKEUP_EVENTS = 0x04, SMU_PWR_CLR_WAKEUP_EVENTS = 0x05, SMU_PWR_LAST_SHUTDOWN_CAUSE = 0x07, SMU_PWR_SERVER_ID = 0x08
}
 
enum  {
  SMU_PWR_WAKEUP_KEY = 0x01, SMU_PWR_WAKEUP_AC_INSERT = 0x02, SMU_PWR_WAKEUP_AC_CHANGE = 0x04, SMU_PWR_WAKEUP_LID_OPEN = 0x08,
  SMU_PWR_WAKEUP_RING = 0x10
}
 

Macro Definition Documentation

#define SMU_CMD_BATTERY_COMMAND   0x6f

Definition at line 79 of file smu.h.

#define SMU_CMD_FAN_COMMAND   0x4a

Definition at line 71 of file smu.h.

#define SMU_CMD_GET_BATTERY_INFO   0x00

Definition at line 80 of file smu.h.

#define SMU_CMD_I2C_COMMAND   0x9a

Definition at line 166 of file smu.h.

#define SMU_CMD_MISC_df_COMMAND   0xdf

Definition at line 212 of file smu.h.

#define SMU_CMD_MISC_df_DIMM_OFFSET   0x99

Definition at line 253 of file smu.h.

#define SMU_CMD_MISC_df_NMI_OPTION   0x04

Definition at line 242 of file smu.h.

#define SMU_CMD_MISC_df_SET_DISPLAY_LIT   0x02

Definition at line 227 of file smu.h.

#define SMU_CMD_MISC_ee_COMMAND   0xee

Definition at line 314 of file smu.h.

#define SMU_CMD_MISC_ee_GET_DATA   0x05 /* i: 00 , o: ?? */

Definition at line 325 of file smu.h.

#define SMU_CMD_MISC_ee_GET_DATABLOCK_REC   0x02

Definition at line 315 of file smu.h.

#define SMU_CMD_MISC_ee_GET_WATTS   0x03

Definition at line 322 of file smu.h.

#define SMU_CMD_MISC_ee_LEDS_CTRL   0x04 /* i: 00 (00,01) [00] */

Definition at line 324 of file smu.h.

#define SMU_CMD_PARTITION_BASE   0x02

Definition at line 39 of file smu.h.

#define SMU_CMD_PARTITION_COMMAND   0x3e

Definition at line 37 of file smu.h.

#define SMU_CMD_PARTITION_LATEST   0x01

Definition at line 38 of file smu.h.

#define SMU_CMD_PARTITION_UPDATE   0x03

Definition at line 40 of file smu.h.

#define SMU_CMD_POWER_COMMAND   0xaa

Definition at line 191 of file smu.h.

#define SMU_CMD_POWER_EVENTS_COMMAND   0x8f

Definition at line 334 of file smu.h.

#define SMU_CMD_POWER_RESTART   "RESTART"

Definition at line 192 of file smu.h.

#define SMU_CMD_POWER_SHUTDOWN   "SHUTDOWN"

Definition at line 193 of file smu.h.

#define SMU_CMD_POWER_VOLTAGE_SLEW   "VSLEW"

Definition at line 194 of file smu.h.

#define SMU_CMD_READ_ADC   0xd8

Definition at line 202 of file smu.h.

#define SMU_CMD_RTC_COMMAND   0x8e

Definition at line 93 of file smu.h.

#define SMU_CMD_RTC_GET_DATETIME   0x81 /* o: 7 bytes date */

Definition at line 105 of file smu.h.

#define SMU_CMD_RTC_GET_PRAM_BYTE   0x28 /* i: 1 bytes (address?) */

Definition at line 101 of file smu.h.

#define SMU_CMD_RTC_GET_PRAM_HI_BYTES   0x2a /* o: 10 bytes */

Definition at line 103 of file smu.h.

#define SMU_CMD_RTC_GET_PRAM_LO_BYTES   0x29 /* o: 10 bytes */

Definition at line 102 of file smu.h.

#define SMU_CMD_RTC_GET_PWRUP_TIMER   0x01 /* o: 7 bytes date */

Definition at line 95 of file smu.h.

#define SMU_CMD_RTC_SET_DATETIME   0x80 /* i: 7 bytes date */

Definition at line 104 of file smu.h.

#define SMU_CMD_RTC_SET_PRAM_AUTOINC   0x21 /* i: 1 byte (data?) */

Definition at line 98 of file smu.h.

#define SMU_CMD_RTC_SET_PRAM_BYTE_ACC   0x20 /* i: 1 byte (address?) */

Definition at line 97 of file smu.h.

#define SMU_CMD_RTC_SET_PRAM_HI_BYTES   0x23 /* i: 10 bytes */

Definition at line 100 of file smu.h.

#define SMU_CMD_RTC_SET_PRAM_LO_BYTES   0x22 /* i: 10 bytes */

Definition at line 99 of file smu.h.

#define SMU_CMD_RTC_SET_PWRUP_TIMER   0x00 /* i: 7 bytes date */

Definition at line 94 of file smu.h.

#define SMU_CMD_RTC_STOP_PWRUP_TIMER   0x02

Definition at line 96 of file smu.h.

#define SMU_CMD_SWITCHES   0xdc

Definition at line 282 of file smu.h.

#define SMU_CMD_VERSION_COMMAND   0xea

Definition at line 265 of file smu.h.

#define SMU_CMDTYPE_GET_PARTITION   2 /* retrieve an sdb partition */

Definition at line 687 of file smu.h.

#define SMU_CMDTYPE_SMU   0 /* SMU command */

Definition at line 685 of file smu.h.

#define SMU_CMDTYPE_WANTS_EVENTS   1 /* switch fd to events mode */

Definition at line 686 of file smu.h.

#define SMU_I2C_TRANSFER_COMBINED   0x02

Definition at line 170 of file smu.h.

#define SMU_I2C_TRANSFER_SIMPLE   0x00

Definition at line 168 of file smu.h.

#define SMU_I2C_TRANSFER_STDSUB   0x01

Definition at line 169 of file smu.h.

#define SMU_SDB_CPUDIODE_ID   0x18

Definition at line 592 of file smu.h.

#define SMU_SDB_CPUPIDDATA_ID   0x17

Definition at line 623 of file smu.h.

#define SMU_SDB_CPUVCP_ID   0x21

Definition at line 580 of file smu.h.

#define SMU_SDB_DEBUG_SWITCHES_ID   0x05

Definition at line 637 of file smu.h.

#define SMU_SDB_FVT_ID   0x12

Definition at line 558 of file smu.h.

#define SMU_SDB_SENSORTREE_ID   0x25

Definition at line 612 of file smu.h.

#define SMU_SDB_SLOTSPOW_ID   0x78

Definition at line 602 of file smu.h.

#define SMU_SWITCH_AC_POWER   0x04

Definition at line 286 of file smu.h.

#define SMU_SWITCH_CASE_CLOSED   0x01

Definition at line 285 of file smu.h.

#define SMU_SWITCH_POWER_SWITCH   0x08

Definition at line 287 of file smu.h.

#define SMU_U16_MIX (   x)    le16_to_cpu(x)

Definition at line 550 of file smu.h.

#define SMU_U32_MIX (   x)    ((((x) & 0xff00ff00u) >> 8)|(((x) & 0x00ff00ffu) << 8))

Definition at line 551 of file smu.h.

#define SMU_VERSION_BASE   0x01

Definition at line 267 of file smu.h.

#define SMU_VERSION_RUNNING   0x00

Definition at line 266 of file smu.h.

#define SMU_VERSION_UPDATE   0x02

Definition at line 268 of file smu.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
SMU_PWR_GET_POWERUP_EVENTS 
SMU_PWR_SET_POWERUP_EVENTS 
SMU_PWR_CLR_POWERUP_EVENTS 
SMU_PWR_GET_WAKEUP_EVENTS 
SMU_PWR_SET_WAKEUP_EVENTS 
SMU_PWR_CLR_WAKEUP_EVENTS 
SMU_PWR_LAST_SHUTDOWN_CAUSE 
SMU_PWR_SERVER_ID 

Definition at line 337 of file smu.h.

anonymous enum
Enumerator:
SMU_PWR_WAKEUP_KEY 
SMU_PWR_WAKEUP_AC_INSERT 
SMU_PWR_WAKEUP_AC_CHANGE 
SMU_PWR_WAKEUP_LID_OPEN 
SMU_PWR_WAKEUP_RING 

Definition at line 366 of file smu.h.