Linux Kernel
3.7.1
|
Go to the source code of this file.
Typedefs | |
typedef int(* | sci_handler )(int status) |
Enumerations | |
enum | { EVENT_LID = 0x23, EVENT_DISPLAY_TOGGLE, EVENT_SLEEP, EVENT_OVERTEMP, EVENT_CRT_DETECT, EVENT_CAMERA, EVENT_USB_OC2, EVENT_USB_OC0, EVENT_BLACK_SCREEN, EVENT_AUDIO_MUTE, EVENT_DISPLAY_BRIGHTNESS, EVENT_AC_BAT, EVENT_AUDIO_VOLUME, EVENT_WLAN, EVENT_END } |
Functions | |
unsigned char | ec_read (unsigned short addr) |
void | ec_write (unsigned short addr, unsigned char val) |
int | ec_query_seq (unsigned char cmd) |
int | ec_query_event_num (void) |
int | ec_get_event_num (void) |
Variables | |
sci_handler | yeeloong_report_lid_status |
#define BIT_BACKLIGHT_OFF 0 |
Definition at line 141 of file ec_kb3310b.h.
#define BIT_BACKLIGHT_ON 1 |
Definition at line 140 of file ec_kb3310b.h.
#define BIT_BAT_CHARGE_STATUS_OVERTEMP (1 << 2) |
Definition at line 104 of file ec_kb3310b.h.
#define BIT_BAT_CHARGE_STATUS_PRECHG (1 << 1) |
Definition at line 105 of file ec_kb3310b.h.
#define BIT_BAT_POWER_ACIN (1 << 0) |
Definition at line 112 of file ec_kb3310b.h.
#define BIT_BAT_POWER_ON (1 << 1) |
Definition at line 111 of file ec_kb3310b.h.
#define BIT_BAT_POWER_S3 (1 << 2) |
Definition at line 110 of file ec_kb3310b.h.
#define BIT_BAT_STATE_CHARGING (1 << 1) |
Definition at line 107 of file ec_kb3310b.h.
#define BIT_BAT_STATE_DISCHARGING (1 << 0) |
Definition at line 108 of file ec_kb3310b.h.
#define BIT_BAT_STATUS_DESTROY (1 << 2) |
Definition at line 100 of file ec_kb3310b.h.
#define BIT_BAT_STATUS_FULL (1 << 1) |
Definition at line 101 of file ec_kb3310b.h.
#define BIT_BAT_STATUS_IN (1 << 0) |
Definition at line 102 of file ec_kb3310b.h.
#define BIT_BAT_STATUS_LOW (1 << 5) |
Definition at line 99 of file ec_kb3310b.h.
#define BIT_CAMERA_CONTROL_OFF 0 |
Definition at line 161 of file ec_kb3310b.h.
#define BIT_CAMERA_CONTROL_ON 1 |
Definition at line 162 of file ec_kb3310b.h.
#define BIT_CAMERA_STATUS_OFF 0 |
Definition at line 159 of file ec_kb3310b.h.
#define BIT_CAMERA_STATUS_ON 1 |
Definition at line 158 of file ec_kb3310b.h.
#define BIT_CRT_DETECT_PLUG 1 |
Definition at line 131 of file ec_kb3310b.h.
#define BIT_CRT_DETECT_UNPLUG 0 |
Definition at line 132 of file ec_kb3310b.h.
#define BIT_DISPLAY_LCD_OFF 0 |
Definition at line 137 of file ec_kb3310b.h.
#define BIT_DISPLAY_LCD_ON 1 |
Definition at line 136 of file ec_kb3310b.h.
#define BIT_FAN_AUTO 0 |
Definition at line 59 of file ec_kb3310b.h.
#define BIT_FAN_CONTROL_OFF (0 << 0) |
Definition at line 63 of file ec_kb3310b.h.
#define BIT_FAN_CONTROL_ON (1 << 0) |
Definition at line 62 of file ec_kb3310b.h.
#define BIT_FAN_MANUAL 1 |
Definition at line 60 of file ec_kb3310b.h.
#define BIT_FAN_STATUS_OFF (0 << 0) |
Definition at line 66 of file ec_kb3310b.h.
#define BIT_FAN_STATUS_ON (1 << 0) |
Definition at line 65 of file ec_kb3310b.h.
#define BIT_LED_GREEN_CHARGE (1 << 2) |
Definition at line 149 of file ec_kb3310b.h.
#define BIT_LED_NUMLOCK (1 << 4) |
Definition at line 151 of file ec_kb3310b.h.
#define BIT_LED_ORANGE_POWER (1 << 1) |
Definition at line 148 of file ec_kb3310b.h.
#define BIT_LED_RED_CHARGE (1 << 3) |
Definition at line 150 of file ec_kb3310b.h.
#define BIT_LED_RED_POWER (1 << 0) |
Definition at line 147 of file ec_kb3310b.h.
#define BIT_LED_TEST_IN 1 |
Definition at line 154 of file ec_kb3310b.h.
#define BIT_LED_TEST_OUT 0 |
Definition at line 155 of file ec_kb3310b.h.
#define BIT_LID_DETECT_OFF 0 |
Definition at line 128 of file ec_kb3310b.h.
#define BIT_LID_DETECT_ON 1 |
Definition at line 127 of file ec_kb3310b.h.
#define BIT_RESET_ON 1 |
Definition at line 144 of file ec_kb3310b.h.
#define BIT_USB_FLAG_OFF 0 |
Definition at line 124 of file ec_kb3310b.h.
#define BIT_USB_FLAG_ON 1 |
Definition at line 123 of file ec_kb3310b.h.
#define BIT_WLAN_OFF 0 |
Definition at line 166 of file ec_kb3310b.h.
#define BIT_WLAN_ON 1 |
Definition at line 165 of file ec_kb3310b.h.
#define CMD_EXIT_IDLE_MODE 0xdf |
Definition at line 50 of file ec_kb3310b.h.
#define CMD_GET_EVENT_NUM 0x84 |
Definition at line 53 of file ec_kb3310b.h.
#define CMD_INIT_IDLE_MODE 0xdd |
Definition at line 49 of file ec_kb3310b.h.
#define CMD_INIT_RESET_MODE 0xd8 |
Definition at line 51 of file ec_kb3310b.h.
#define CMD_PROGRAM_PIECE 0xda |
Definition at line 54 of file ec_kb3310b.h.
#define CMD_REBOOT_SYSTEM 0x8c |
Definition at line 52 of file ec_kb3310b.h.
#define EC_CMD_PORT 0x66 |
Definition at line 46 of file ec_kb3310b.h.
#define EC_CMD_TIMEOUT 0x1000 |
Definition at line 41 of file ec_kb3310b.h.
#define EC_DAT_PORT 0x62 |
Definition at line 48 of file ec_kb3310b.h.
#define EC_IO_PORT_DATA 0x0383 |
Definition at line 35 of file ec_kb3310b.h.
#define EC_IO_PORT_HIGH 0x0381 |
Definition at line 33 of file ec_kb3310b.h.
#define EC_IO_PORT_LOW 0x0382 |
Definition at line 34 of file ec_kb3310b.h.
#define EC_REG_DELAY 500 /* unit : us */ |
Definition at line 40 of file ec_kb3310b.h.
#define EC_STS_PORT 0x66 |
Definition at line 47 of file ec_kb3310b.h.
#define FAN_SPEED_DIVIDER 480000 /* (60*1000*1000/62.5/2)*/ |
Definition at line 71 of file ec_kb3310b.h.
#define FLAG_BAT_CELL_3S1P 0x03 |
Definition at line 92 of file ec_kb3310b.h.
#define FLAG_BAT_CELL_3S2P 0x06 |
Definition at line 93 of file ec_kb3310b.h.
#define FLAG_BAT_CHARGE_ACPOWER 0x00 |
Definition at line 97 of file ec_kb3310b.h.
#define FLAG_BAT_CHARGE_CHARGE 0x02 |
Definition at line 96 of file ec_kb3310b.h.
#define FLAG_BAT_CHARGE_DISCHARGE 0x01 |
Definition at line 95 of file ec_kb3310b.h.
#define FLAG_BAT_VENDOR_SANYO 0x01 |
Definition at line 89 of file ec_kb3310b.h.
#define FLAG_BAT_VENDOR_SIMPLO 0x02 |
Definition at line 90 of file ec_kb3310b.h.
#define REG_AUDIO_BEEP 0xF4D0 |
Definition at line 118 of file ec_kb3310b.h.
#define REG_AUDIO_MUTE 0xF4E7 |
Definition at line 117 of file ec_kb3310b.h.
#define REG_AUDIO_VOLUME 0xF46C |
Definition at line 116 of file ec_kb3310b.h.
#define REG_BACKLIGHT_CTRL 0xF7BD |
Definition at line 139 of file ec_kb3310b.h.
#define REG_BAT_CELL_COUNT 0xF4C6 |
Definition at line 91 of file ec_kb3310b.h.
#define REG_BAT_CHARGE 0xF4A2 |
Definition at line 94 of file ec_kb3310b.h.
#define REG_BAT_CHARGE_STATUS 0xF4B1 |
Definition at line 103 of file ec_kb3310b.h.
#define REG_BAT_CURRENT_HIGH 0xF784 |
Definition at line 80 of file ec_kb3310b.h.
#define REG_BAT_CURRENT_LOW 0xF785 |
Definition at line 81 of file ec_kb3310b.h.
#define REG_BAT_DESIGN_CAP_HIGH 0xF77D |
Definition at line 74 of file ec_kb3310b.h.
#define REG_BAT_DESIGN_CAP_LOW 0xF77E |
Definition at line 75 of file ec_kb3310b.h.
#define REG_BAT_DESIGN_VOL_HIGH 0xF782 |
Definition at line 78 of file ec_kb3310b.h.
#define REG_BAT_DESIGN_VOL_LOW 0xF783 |
Definition at line 79 of file ec_kb3310b.h.
#define REG_BAT_FULLCHG_CAP_HIGH 0xF780 |
Definition at line 76 of file ec_kb3310b.h.
#define REG_BAT_FULLCHG_CAP_LOW 0xF781 |
Definition at line 77 of file ec_kb3310b.h.
#define REG_BAT_POWER 0xF440 |
Definition at line 109 of file ec_kb3310b.h.
#define REG_BAT_RELATIVE_CAP_HIGH 0xF492 |
Definition at line 86 of file ec_kb3310b.h.
#define REG_BAT_RELATIVE_CAP_LOW 0xF493 |
Definition at line 87 of file ec_kb3310b.h.
#define REG_BAT_STATE 0xF482 |
Definition at line 106 of file ec_kb3310b.h.
#define REG_BAT_STATUS 0xF4B0 |
Definition at line 98 of file ec_kb3310b.h.
#define REG_BAT_TEMPERATURE_HIGH 0xF788 |
Definition at line 84 of file ec_kb3310b.h.
#define REG_BAT_TEMPERATURE_LOW 0xF789 |
Definition at line 85 of file ec_kb3310b.h.
#define REG_BAT_VENDOR 0xF4C4 |
Definition at line 88 of file ec_kb3310b.h.
#define REG_BAT_VOLTAGE_HIGH 0xF786 |
Definition at line 82 of file ec_kb3310b.h.
#define REG_BAT_VOLTAGE_LOW 0xF787 |
Definition at line 83 of file ec_kb3310b.h.
#define REG_CAMERA_CONTROL 0xF7B7 |
Definition at line 160 of file ec_kb3310b.h.
#define REG_CAMERA_STATUS 0xF46A |
Definition at line 157 of file ec_kb3310b.h.
#define REG_CRT_DETECT 0xF4AD |
Definition at line 130 of file ec_kb3310b.h.
#define REG_DISPLAY_BRIGHTNESS 0xF4F5 |
Definition at line 134 of file ec_kb3310b.h.
#define REG_DISPLAY_LCD 0xF79F |
Definition at line 167 of file ec_kb3310b.h.
#define REG_FAN_AUTO_MAN_SWITCH 0xF459 |
Definition at line 58 of file ec_kb3310b.h.
#define REG_FAN_CONTROL 0xF4D2 |
Definition at line 61 of file ec_kb3310b.h.
#define REG_FAN_SPEED_HIGH 0xFE22 |
Definition at line 67 of file ec_kb3310b.h.
#define REG_FAN_SPEED_LEVEL 0xF4CC |
Definition at line 69 of file ec_kb3310b.h.
#define REG_FAN_SPEED_LOW 0xFE23 |
Definition at line 68 of file ec_kb3310b.h.
#define REG_FAN_STATUS 0xF4DA |
Definition at line 64 of file ec_kb3310b.h.
#define REG_LED 0xF4C8 |
Definition at line 146 of file ec_kb3310b.h.
#define REG_LED_TEST 0xF4C2 |
Definition at line 153 of file ec_kb3310b.h.
#define REG_LID_DETECT 0xF4BD |
Definition at line 126 of file ec_kb3310b.h.
#define REG_RESET 0xF4EC |
Definition at line 143 of file ec_kb3310b.h.
#define REG_TEMPERATURE_VALUE 0xF458 |
Definition at line 57 of file ec_kb3310b.h.
#define REG_USB0_FLAG 0xF461 |
Definition at line 120 of file ec_kb3310b.h.
#define REG_USB1_FLAG 0xF462 |
Definition at line 121 of file ec_kb3310b.h.
#define REG_USB2_FLAG 0xF463 |
Definition at line 122 of file ec_kb3310b.h.
#define REG_WLAN 0xF4FA |
Definition at line 164 of file ec_kb3310b.h.
#define SCI_IRQ_NUM 0x0A |
Definition at line 25 of file ec_kb3310b.h.
Definition at line 22 of file ec_kb3310b.h.
anonymous enum |
Definition at line 170 of file ec_kb3310b.h.
Definition at line 105 of file ec_kb3310b.c.
Definition at line 93 of file ec_kb3310b.c.
Definition at line 54 of file ec_kb3310b.c.
Definition at line 22 of file ec_kb3310b.c.
Definition at line 37 of file ec_kb3310b.c.
sci_handler yeeloong_report_lid_status |