Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/power_supply.h>
#include <linux/mfd/88pm860x.h>
#include <linux/delay.h>
#include <linux/uaccess.h>
#include <asm/div64.h>
Go to the source code of this file.
Data Structures | |
struct | pm860x_charger_info |
struct | pm860x_irq_desc |
Macros | |
#define | STATUS2_CHG (1 << 2) |
#define | RESET_SW_PD (1 << 7) |
#define | PREREG1_90MA (0x0) |
#define | PREREG1_180MA (0x1) |
#define | PREREG1_450MA (0x4) |
#define | PREREG1_540MA (0x5) |
#define | PREREG1_1350MA (0xE) |
#define | PREREG1_VSYS_4_5V (3 << 4) |
#define | CC1_MODE_OFF (0) |
#define | CC1_MODE_PRECHARGE (1) |
#define | CC1_MODE_FASTCHARGE (2) |
#define | CC1_MODE_PULSECHARGE (3) |
#define | CC1_ITERM_20MA (0 << 2) |
#define | CC1_ITERM_60MA (2 << 2) |
#define | CC1_VFCHG_4_2V (9 << 4) |
#define | CC2_ICHG_100MA (0x1) |
#define | CC2_ICHG_500MA (0x9) |
#define | CC2_ICHG_1000MA (0x13) |
#define | CC3_180MIN_TIMEOUT (0x6 << 4) |
#define | CC3_270MIN_TIMEOUT (0x7 << 4) |
#define | CC3_360MIN_TIMEOUT (0xA << 4) |
#define | CC3_DISABLE_TIMEOUT (0xF << 4) |
#define | CC4_IPRE_40MA (7) |
#define | CC4_VPCHG_3_2V (3 << 4) |
#define | CC4_IFCHG_MON_EN (1 << 6) |
#define | CC4_BTEMP_MON_EN (1 << 7) |
#define | CC6_BAT_OV_EN (1 << 2) |
#define | CC6_BAT_UV_EN (1 << 3) |
#define | CC6_UV_VBAT_SET (0x3 << 6) /* 2.8v */ |
#define | CC7_BAT_REM_EN (1 << 3) |
#define | CC7_IFSM_EN (1 << 7) |
#define | MEAS1_VBAT (1 << 0) |
#define | MEAS3_IBAT_EN (1 << 0) |
#define | MEAS3_CC_EN (1 << 2) |
#define | FSM_INIT 0 |
#define | FSM_DISCHARGE 1 |
#define | FSM_PRECHARGE 2 |
#define | FSM_FASTCHARGE 3 |
#define | PRECHARGE_THRESHOLD 3100 |
#define | POWEROFF_THRESHOLD 3400 |
#define | CHARGE_THRESHOLD 4000 |
#define | DISCHARGE_THRESHOLD 4180 |
#define | OVER_TEMP_FLAG (1 << 6) |
#define | OVTEMP_AUTORECOVER (1 << 3) |
#define | VCHG_NORMAL_LOW 4200 |
#define | VCHG_NORMAL_CHECK 5800 |
#define | VCHG_NORMAL_HIGH 6000 |
#define | VCHG_OVP_LOW 5500 |
Functions | |
module_platform_driver (pm860x_charger_driver) | |
MODULE_DESCRIPTION ("Marvell 88PM860x Charger driver") | |
MODULE_LICENSE ("GPL") | |
#define CC1_ITERM_20MA (0 << 2) |
Definition at line 42 of file 88pm860x_charger.c.
#define CC1_ITERM_60MA (2 << 2) |
Definition at line 43 of file 88pm860x_charger.c.
#define CC1_MODE_FASTCHARGE (2) |
Definition at line 40 of file 88pm860x_charger.c.
#define CC1_MODE_OFF (0) |
Definition at line 38 of file 88pm860x_charger.c.
#define CC1_MODE_PRECHARGE (1) |
Definition at line 39 of file 88pm860x_charger.c.
#define CC1_MODE_PULSECHARGE (3) |
Definition at line 41 of file 88pm860x_charger.c.
#define CC1_VFCHG_4_2V (9 << 4) |
Definition at line 44 of file 88pm860x_charger.c.
#define CC2_ICHG_1000MA (0x13) |
Definition at line 49 of file 88pm860x_charger.c.
#define CC2_ICHG_100MA (0x1) |
Definition at line 47 of file 88pm860x_charger.c.
#define CC2_ICHG_500MA (0x9) |
Definition at line 48 of file 88pm860x_charger.c.
#define CC3_180MIN_TIMEOUT (0x6 << 4) |
Definition at line 52 of file 88pm860x_charger.c.
#define CC3_270MIN_TIMEOUT (0x7 << 4) |
Definition at line 53 of file 88pm860x_charger.c.
#define CC3_360MIN_TIMEOUT (0xA << 4) |
Definition at line 54 of file 88pm860x_charger.c.
#define CC3_DISABLE_TIMEOUT (0xF << 4) |
Definition at line 55 of file 88pm860x_charger.c.
#define CC4_BTEMP_MON_EN (1 << 7) |
Definition at line 61 of file 88pm860x_charger.c.
#define CC4_IFCHG_MON_EN (1 << 6) |
Definition at line 60 of file 88pm860x_charger.c.
#define CC4_IPRE_40MA (7) |
Definition at line 58 of file 88pm860x_charger.c.
#define CC4_VPCHG_3_2V (3 << 4) |
Definition at line 59 of file 88pm860x_charger.c.
#define CC6_BAT_OV_EN (1 << 2) |
Definition at line 64 of file 88pm860x_charger.c.
#define CC6_BAT_UV_EN (1 << 3) |
Definition at line 65 of file 88pm860x_charger.c.
#define CC6_UV_VBAT_SET (0x3 << 6) /* 2.8v */ |
Definition at line 66 of file 88pm860x_charger.c.
#define CC7_BAT_REM_EN (1 << 3) |
Definition at line 69 of file 88pm860x_charger.c.
#define CC7_IFSM_EN (1 << 7) |
Definition at line 70 of file 88pm860x_charger.c.
#define CHARGE_THRESHOLD 4000 |
Definition at line 86 of file 88pm860x_charger.c.
#define DISCHARGE_THRESHOLD 4180 |
Definition at line 87 of file 88pm860x_charger.c.
#define FSM_DISCHARGE 1 |
Definition at line 80 of file 88pm860x_charger.c.
#define FSM_FASTCHARGE 3 |
Definition at line 82 of file 88pm860x_charger.c.
#define FSM_INIT 0 |
Definition at line 79 of file 88pm860x_charger.c.
#define FSM_PRECHARGE 2 |
Definition at line 81 of file 88pm860x_charger.c.
#define MEAS1_VBAT (1 << 0) |
Definition at line 73 of file 88pm860x_charger.c.
#define MEAS3_CC_EN (1 << 2) |
Definition at line 77 of file 88pm860x_charger.c.
#define MEAS3_IBAT_EN (1 << 0) |
Definition at line 76 of file 88pm860x_charger.c.
#define OVER_TEMP_FLAG (1 << 6) |
Definition at line 90 of file 88pm860x_charger.c.
#define OVTEMP_AUTORECOVER (1 << 3) |
Definition at line 91 of file 88pm860x_charger.c.
#define POWEROFF_THRESHOLD 3400 |
Definition at line 85 of file 88pm860x_charger.c.
#define PRECHARGE_THRESHOLD 3100 |
Definition at line 84 of file 88pm860x_charger.c.
#define PREREG1_1350MA (0xE) |
Definition at line 34 of file 88pm860x_charger.c.
#define PREREG1_180MA (0x1) |
Definition at line 31 of file 88pm860x_charger.c.
#define PREREG1_450MA (0x4) |
Definition at line 32 of file 88pm860x_charger.c.
#define PREREG1_540MA (0x5) |
Definition at line 33 of file 88pm860x_charger.c.
#define PREREG1_90MA (0x0) |
Definition at line 30 of file 88pm860x_charger.c.
#define PREREG1_VSYS_4_5V (3 << 4) |
Definition at line 35 of file 88pm860x_charger.c.
#define RESET_SW_PD (1 << 7) |
Definition at line 27 of file 88pm860x_charger.c.
#define STATUS2_CHG (1 << 2) |
Definition at line 24 of file 88pm860x_charger.c.
#define VCHG_NORMAL_CHECK 5800 |
Definition at line 95 of file 88pm860x_charger.c.
#define VCHG_NORMAL_HIGH 6000 |
Definition at line 96 of file 88pm860x_charger.c.
#define VCHG_NORMAL_LOW 4200 |
Definition at line 94 of file 88pm860x_charger.c.
#define VCHG_OVP_LOW 5500 |
Definition at line 97 of file 88pm860x_charger.c.
MODULE_DESCRIPTION | ( | "Marvell 88PM860x Charger driver" | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_platform_driver | ( | pm860x_charger_driver | ) |