Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

pmic_battery.c File Reference


Detailed Description

This is the main file of PMIC(mc13783) Battery driver.

Definition in file pmic_battery.c.

#include <linux/platform_device.h>
#include <linux/poll.h>
#include <linux/sched.h>
#include <linux/time.h>
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/pmic_battery.h>
#include <linux/pmic_adc.h>
#include <linux/pmic_status.h>
#include "pmic_battery_defs.h"
#include <mach/pmic_power.h>

Go to the source code of this file.

Functions

static void callback_chg_detect (void)
static void callback_chg_full (void)
static void callback_chg_overvoltage (void)
static void callback_low_battery (void)
static void callback_power_fail (void)
static DECLARE_MUTEX (count_mutex)
 EXPORT_SYMBOL (pmic_batt_event_unsubscribe)
 EXPORT_SYMBOL (pmic_batt_event_subscribe)
 EXPORT_SYMBOL (pmic_batt_set_5k_pull)
 EXPORT_SYMBOL (pmic_batt_set_unregulated)
 EXPORT_SYMBOL (pmic_batt_set_reverse_supply)
 EXPORT_SYMBOL (pmic_batt_led_control)
 EXPORT_SYMBOL (pmic_batt_set_threshold)
 EXPORT_SYMBOL (pmic_batt_set_out_control)
 EXPORT_SYMBOL (pmic_batt_disable_eol)
 EXPORT_SYMBOL (pmic_batt_bp_enable_eol)
 EXPORT_SYMBOL (pmic_batt_enable_eol)
 EXPORT_SYMBOL (pmic_batt_get_charge_current)
 EXPORT_SYMBOL (pmic_batt_get_charger_setting)
 EXPORT_SYMBOL (pmic_batt_set_charger)
 EXPORT_SYMBOL (pmic_batt_disable_charger)
 EXPORT_SYMBOL (pmic_batt_enable_charger)
PMIC_STATUS pmic_batt_disable_charger (t_batt_charger chgr)
PMIC_STATUS pmic_batt_enable_charger (t_batt_charger chgr, unsigned char c_voltage, unsigned char c_current)
PMIC_STATUS pmic_batt_enable_eol (unsigned char threshold)
PMIC_STATUS pmic_batt_get_batt_current (unsigned short *b_current)
PMIC_STATUS pmic_batt_get_batt_temperature (unsigned short *b_temper)
PMIC_STATUS pmic_batt_get_batt_voltage (unsigned short *b_voltage)
PMIC_STATUS pmic_batt_get_charge_current (unsigned short *c_current)
PMIC_STATUS pmic_batt_get_charge_voltage (unsigned short *c_voltage)
PMIC_STATUS pmic_batt_get_charger_setting (t_batt_charger chgr, unsigned char *c_voltage, unsigned char *c_current)
PMIC_STATUS pmic_batt_set_charger (t_batt_charger chgr, unsigned char c_voltage, unsigned char c_current)
static int pmic_battery_resume (struct platform_device *pdev)
static int pmic_battery_suspend (struct platform_device *pdev, pm_message_t state)

Variables

static int open_count
static struct class * pmic_battery_class
static int pmic_battery_major
static int suspend_flag = 0
static wait_queue_head_t suspendq
static int swait = 0


Generated by  Doxygen 1.6.0   Back to index