#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/err.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/jiffies.h>
#include <linux/sched.h>
#include <linux/olpc-ec.h>
#include <asm/olpc.h>
Go to the source code of this file.
|
| #define | EC_BAT_VOLTAGE 0x10 /* uint16_t, *9.76/32, mV */ |
| |
| #define | EC_BAT_CURRENT 0x11 /* int16_t, *15.625/120, mA */ |
| |
| #define | EC_BAT_ACR 0x12 /* int16_t, *6250/15, µAh */ |
| |
| #define | EC_BAT_TEMP 0x13 /* uint16_t, *100/256, °C */ |
| |
| #define | EC_AMB_TEMP 0x14 /* uint16_t, *100/256, °C */ |
| |
| #define | EC_BAT_STATUS 0x15 /* uint8_t, bitmask */ |
| |
| #define | EC_BAT_SOC 0x16 /* uint8_t, percentage */ |
| |
| #define | EC_BAT_SERIAL 0x17 /* uint8_t[6] */ |
| |
| #define | EC_BAT_EEPROM 0x18 /* uint8_t adr as input, uint8_t output */ |
| |
| #define | EC_BAT_ERRCODE 0x1f /* uint8_t, bitmask */ |
| |
| #define | BAT_STAT_PRESENT 0x01 |
| |
| #define | BAT_STAT_FULL 0x02 |
| |
| #define | BAT_STAT_LOW 0x04 |
| |
| #define | BAT_STAT_DESTROY 0x08 |
| |
| #define | BAT_STAT_AC 0x10 |
| |
| #define | BAT_STAT_CHARGING 0x20 |
| |
| #define | BAT_STAT_DISCHARGING 0x40 |
| |
| #define | BAT_STAT_TRICKLE 0x80 |
| |
| #define | BAT_ERR_INFOFAIL 0x02 |
| |
| #define | BAT_ERR_OVERVOLTAGE 0x04 |
| |
| #define | BAT_ERR_OVERTEMP 0x05 |
| |
| #define | BAT_ERR_GAUGESTOP 0x06 |
| |
| #define | BAT_ERR_OUT_OF_CONTROL 0x07 |
| |
| #define | BAT_ERR_ID_FAIL 0x09 |
| |
| #define | BAT_ERR_ACR_FAIL 0x10 |
| |
| #define | BAT_ADDR_MFR_TYPE 0x5F |
| |
| #define | EEPROM_START 0x20 |
| |
| #define | EEPROM_END 0x80 |
| |
| #define | EEPROM_SIZE (EEPROM_END - EEPROM_START) |
| |
| #define BAT_ADDR_MFR_TYPE 0x5F |
| #define BAT_ERR_ACR_FAIL 0x10 |
| #define BAT_ERR_GAUGESTOP 0x06 |
| #define BAT_ERR_ID_FAIL 0x09 |
| #define BAT_ERR_INFOFAIL 0x02 |
| #define BAT_ERR_OUT_OF_CONTROL 0x07 |
| #define BAT_ERR_OVERTEMP 0x05 |
| #define BAT_ERR_OVERVOLTAGE 0x04 |
| #define BAT_STAT_CHARGING 0x20 |
| #define BAT_STAT_DESTROY 0x08 |
| #define BAT_STAT_DISCHARGING 0x40 |
| #define BAT_STAT_FULL 0x02 |
| #define BAT_STAT_LOW 0x04 |
| #define BAT_STAT_PRESENT 0x01 |
| #define BAT_STAT_TRICKLE 0x80 |
| #define EC_AMB_TEMP 0x14 /* uint16_t, *100/256, °C */ |
| #define EC_BAT_ACR 0x12 /* int16_t, *6250/15, µAh */ |
| #define EC_BAT_CURRENT 0x11 /* int16_t, *15.625/120, mA */ |
| #define EC_BAT_EEPROM 0x18 /* uint8_t adr as input, uint8_t output */ |
| #define EC_BAT_ERRCODE 0x1f /* uint8_t, bitmask */ |
| #define EC_BAT_SERIAL 0x17 /* uint8_t[6] */ |
| #define EC_BAT_SOC 0x16 /* uint8_t, percentage */ |
| #define EC_BAT_STATUS 0x15 /* uint8_t, bitmask */ |
| #define EC_BAT_TEMP 0x13 /* uint16_t, *100/256, °C */ |
| #define EC_BAT_VOLTAGE 0x10 /* uint16_t, *9.76/32, mV */ |
| #define EEPROM_START 0x20 |
| MODULE_DEVICE_TABLE |
( |
of |
, |
|
|
olpc_battery_ids |
|
|
) |
| |
| module_platform_driver |
( |
olpc_battery_driver |
| ) |
|