Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/string.h>
#include <linux/power_supply.h>
#include <linux/mfd/88pm860x.h>
#include <linux/delay.h>
Go to the source code of this file.
Data Structures | |
struct | pm860x_battery_info |
struct | ccnt |
Macros | |
#define | STATUS2_CHG (1 << 2) |
#define | STATUS2_BAT (1 << 3) |
#define | STATUS2_VBUS (1 << 4) |
#define | MEAS1_TINT (1 << 3) |
#define | MEAS1_GP1 (1 << 5) |
#define | MEAS3_IBAT (1 << 0) |
#define | MEAS3_BAT_DET (1 << 1) |
#define | MEAS3_CC (1 << 2) |
#define | MEAS_OFF_SLEEP_EN (1 << 1) |
#define | GPBIAS2_GPADC1_SET (2 << 4) |
#define | GPBIAS2_GPADC1_UA ((GPBIAS2_GPADC1_SET >> 4) * 5 + 1) |
#define | GPMISC1_GPADC_EN (1 << 0) |
#define | CC6_BAT_DET_GPADC1 1 |
#define | CCNT_AVG_SEL (4 << 3) |
#define | RTC_SOC_5LSB (0x1F << 3) |
#define | RTC_SOC_3MSB (0x7) |
#define | BAT_WU_LOG (1<<6) |
#define | CCNT_POS1 0 |
#define | CCNT_POS2 1 |
#define | CCNT_NEG1 2 |
#define | CCNT_NEG2 3 |
#define | CCNT_SPOS 4 |
#define | CCNT_SNEG 5 |
#define | OCV_MODE_ACTIVE 0 |
#define | OCV_MODE_SLEEP 1 |
#define | LOW_BAT_THRESHOLD 3600 |
#define | VBATT_RESISTOR_MIN 3800 |
#define | VBATT_RESISTOR_MAX 4100 |
#define | PM860X_TEMP_TINT (0) |
#define | PM860X_TEMP_TBAT (1) |
#define | TBAT_NEG_25D 127773 /* -25 */ |
#define | TBAT_NEG_10D 54564 /* -10 */ |
#define | TBAT_0D 32330 /* 0 */ |
#define | TBAT_10D 19785 /* 10 */ |
#define | TBAT_20D 12468 /* 20 */ |
#define | TBAT_30D 8072 /* 30 */ |
#define | TBAT_40D 5356 /* 40 */ |
Functions | |
module_platform_driver (pm860x_battery_driver) | |
MODULE_DESCRIPTION ("Marvell 88PM860x Battery driver") | |
MODULE_LICENSE ("GPL") | |
#define BAT_WU_LOG (1<<6) |
Definition at line 61 of file 88pm860x_battery.c.
#define CC6_BAT_DET_GPADC1 1 |
Definition at line 49 of file 88pm860x_battery.c.
#define CCNT_AVG_SEL (4 << 3) |
Definition at line 52 of file 88pm860x_battery.c.
#define CCNT_NEG1 2 |
Definition at line 66 of file 88pm860x_battery.c.
#define CCNT_NEG2 3 |
Definition at line 67 of file 88pm860x_battery.c.
#define CCNT_POS1 0 |
Definition at line 64 of file 88pm860x_battery.c.
#define CCNT_POS2 1 |
Definition at line 65 of file 88pm860x_battery.c.
#define CCNT_SNEG 5 |
Definition at line 69 of file 88pm860x_battery.c.
#define CCNT_SPOS 4 |
Definition at line 68 of file 88pm860x_battery.c.
#define GPBIAS2_GPADC1_SET (2 << 4) |
Definition at line 41 of file 88pm860x_battery.c.
#define GPBIAS2_GPADC1_UA ((GPBIAS2_GPADC1_SET >> 4) * 5 + 1) |
Definition at line 43 of file 88pm860x_battery.c.
#define GPMISC1_GPADC_EN (1 << 0) |
Definition at line 46 of file 88pm860x_battery.c.
#define LOW_BAT_THRESHOLD 3600 |
Definition at line 76 of file 88pm860x_battery.c.
#define MEAS1_GP1 (1 << 5) |
Definition at line 30 of file 88pm860x_battery.c.
#define MEAS1_TINT (1 << 3) |
Definition at line 29 of file 88pm860x_battery.c.
#define MEAS3_BAT_DET (1 << 1) |
Definition at line 34 of file 88pm860x_battery.c.
#define MEAS3_CC (1 << 2) |
Definition at line 35 of file 88pm860x_battery.c.
#define MEAS3_IBAT (1 << 0) |
Definition at line 33 of file 88pm860x_battery.c.
#define MEAS_OFF_SLEEP_EN (1 << 1) |
Definition at line 38 of file 88pm860x_battery.c.
#define OCV_MODE_ACTIVE 0 |
Definition at line 72 of file 88pm860x_battery.c.
#define OCV_MODE_SLEEP 1 |
Definition at line 73 of file 88pm860x_battery.c.
#define PM860X_TEMP_TBAT (1) |
Definition at line 82 of file 88pm860x_battery.c.
#define PM860X_TEMP_TINT (0) |
Definition at line 81 of file 88pm860x_battery.c.
#define RTC_SOC_3MSB (0x7) |
Definition at line 58 of file 88pm860x_battery.c.
#define RTC_SOC_5LSB (0x1F << 3) |
Definition at line 55 of file 88pm860x_battery.c.
#define STATUS2_BAT (1 << 3) |
Definition at line 25 of file 88pm860x_battery.c.
#define STATUS2_CHG (1 << 2) |
Definition at line 24 of file 88pm860x_battery.c.
#define STATUS2_VBUS (1 << 4) |
Definition at line 26 of file 88pm860x_battery.c.
#define TBAT_0D 32330 /* 0 */ |
Definition at line 90 of file 88pm860x_battery.c.
#define TBAT_10D 19785 /* 10 */ |
Definition at line 91 of file 88pm860x_battery.c.
#define TBAT_20D 12468 /* 20 */ |
Definition at line 92 of file 88pm860x_battery.c.
#define TBAT_30D 8072 /* 30 */ |
Definition at line 93 of file 88pm860x_battery.c.
#define TBAT_40D 5356 /* 40 */ |
Definition at line 94 of file 88pm860x_battery.c.
#define TBAT_NEG_10D 54564 /* -10 */ |
Definition at line 89 of file 88pm860x_battery.c.
#define TBAT_NEG_25D 127773 /* -25 */ |
Definition at line 88 of file 88pm860x_battery.c.
#define VBATT_RESISTOR_MAX 4100 |
Definition at line 78 of file 88pm860x_battery.c.
#define VBATT_RESISTOR_MIN 3800 |
Definition at line 77 of file 88pm860x_battery.c.
MODULE_DESCRIPTION | ( | "Marvell 88PM860x Battery driver" | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_platform_driver | ( | pm860x_battery_driver | ) |