#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/power_supply.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/gpio.h>
#include <linux/power/sbs-battery.h>
Go to the source code of this file.
|
enum | {
REG_MANUFACTURER_DATA,
REG_TEMPERATURE,
REG_VOLTAGE,
REG_CURRENT,
REG_CAPACITY,
REG_TIME_TO_EMPTY,
REG_TIME_TO_FULL,
REG_STATUS,
REG_CYCLE_COUNT,
REG_SERIAL_NUMBER,
REG_REMAINING_CAPACITY,
REG_REMAINING_CAPACITY_CHARGE,
REG_FULL_CHARGE_CAPACITY,
REG_FULL_CHARGE_CAPACITY_CHARGE,
REG_DESIGN_CAPACITY,
REG_DESIGN_CAPACITY_CHARGE,
REG_DESIGN_VOLTAGE
} |
|
enum | sbs_battery_mode { BATTERY_MODE_AMPS,
BATTERY_MODE_WATTS
} |
|
#define BASE_UNIT_CONVERSION 1000 |
#define BATTERY_DISCHARGING 0x40 |
#define BATTERY_FULL_CHARGED 0x20 |
#define BATTERY_FULL_DISCHARGED 0x10 |
#define BATTERY_MODE_MASK 0x8000 |
#define BATTERY_MODE_OFFSET 0x03 |
#define MANUFACTURER_ACCESS_SLEEP 0x0011 |
#define MANUFACTURER_ACCESS_STATUS 0x0006 |
#define SBS_DATA |
( |
|
_psp, |
|
|
|
_addr, |
|
|
|
_min_value, |
|
|
|
_max_value |
|
) |
| |
Value:{ \
.psp = _psp, \
.addr = _addr, \
.min_value = _min_value, \
.max_value = _max_value, \
}
Definition at line 70 of file sbs-battery.c.
#define TEMP_KELVIN_TO_CELSIUS 2731 |
#define TIME_UNIT_CONVERSION 60 |
- Enumerator:
REG_MANUFACTURER_DATA |
|
REG_TEMPERATURE |
|
REG_VOLTAGE |
|
REG_CURRENT |
|
REG_CAPACITY |
|
REG_TIME_TO_EMPTY |
|
REG_TIME_TO_FULL |
|
REG_STATUS |
|
REG_CYCLE_COUNT |
|
REG_SERIAL_NUMBER |
|
REG_REMAINING_CAPACITY |
|
REG_REMAINING_CAPACITY_CHARGE |
|
REG_FULL_CHARGE_CAPACITY |
|
REG_FULL_CHARGE_CAPACITY_CHARGE |
|
REG_DESIGN_CAPACITY |
|
REG_DESIGN_CAPACITY_CHARGE |
|
REG_DESIGN_VOLTAGE |
|
Definition at line 33 of file sbs-battery.c.
- Enumerator:
BATTERY_MODE_AMPS |
|
BATTERY_MODE_WATTS |
|
Definition at line 56 of file sbs-battery.c.
MODULE_DESCRIPTION |
( |
"SBS battery monitor driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
sbs_id |
|
|
) |
| |
module_i2c_driver |
( |
sbs_battery_driver |
| ) |
|