mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Revert "power: add battery type selection and check lge battery"
This reverts commit 619dc8d86f676eb19408044f670174c599e4fb37. Conflicts: drivers/power/Kconfig Change-Id: I05004eec5b4c09ca8675e3ee3d85778021156634
This commit is contained in:
parent
d843640426
commit
edd5826b69
4 changed files with 14 additions and 62 deletions
|
@ -84,12 +84,14 @@ unsigned lge_pm_get_usb_current(void);
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
bool is_lge_battery(void);
|
||||
#else
|
||||
static inline bool is_lge_battery(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
enum {
|
||||
BATT_UNKNOWN,
|
||||
BATT_DS2704_N = 17,
|
||||
BATT_DS2704_L = 32,
|
||||
BATT_ISL6296_N = 73,
|
||||
BATT_ISL6296_L = 94,
|
||||
};
|
||||
extern int lge_battery_info;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_KCAL
|
||||
|
|
|
@ -208,39 +208,20 @@ void lge_pm_read_cable_info(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
enum {
|
||||
BATT_ID_UNKNOWN,
|
||||
BATT_ID_DS2704_N = 17,
|
||||
BATT_ID_DS2704_L = 32,
|
||||
BATT_ID_ISL6296_N = 73,
|
||||
BATT_ID_ISL6296_L = 94,
|
||||
};
|
||||
|
||||
static int lge_battery_info = BATT_ID_UNKNOWN;
|
||||
|
||||
bool is_lge_battery(void)
|
||||
{
|
||||
if (lge_battery_info == BATT_ID_DS2704_N ||
|
||||
lge_battery_info == BATT_ID_DS2704_L ||
|
||||
lge_battery_info == BATT_ID_ISL6296_N ||
|
||||
lge_battery_info == BATT_ID_ISL6296_L)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL(is_lge_battery);
|
||||
int lge_battery_info = BATT_UNKNOWN;
|
||||
|
||||
static int __init battery_information_setup(char *batt_info)
|
||||
{
|
||||
if(!strcmp(batt_info, "ds2704_n"))
|
||||
lge_battery_info = BATT_ID_DS2704_N;
|
||||
lge_battery_info = BATT_DS2704_N;
|
||||
else if(!strcmp(batt_info, "ds2704_l"))
|
||||
lge_battery_info = BATT_ID_DS2704_L;
|
||||
lge_battery_info = BATT_DS2704_L;
|
||||
else if(!strcmp(batt_info, "isl6296_n"))
|
||||
lge_battery_info = BATT_ID_ISL6296_N;
|
||||
lge_battery_info = BATT_ISL6296_N;
|
||||
else if(!strcmp(batt_info, "isl6296_l"))
|
||||
lge_battery_info = BATT_ID_ISL6296_L;
|
||||
lge_battery_info = BATT_ISL6296_L;
|
||||
else
|
||||
lge_battery_info = BATT_ID_UNKNOWN;
|
||||
lge_battery_info = BATT_UNKNOWN;
|
||||
|
||||
printk(KERN_INFO "Battery : %s %d\n", batt_info, lge_battery_info);
|
||||
|
||||
|
|
|
@ -435,12 +435,6 @@ config AB8500_BATTERY_THERM_ON_BATCTRL
|
|||
Say Y to enable battery temperature measurements using
|
||||
thermistor connected on BATCTRL ADC.
|
||||
|
||||
config LGE_PM_BATTERY_ID_CHECKER
|
||||
default n
|
||||
bool "LGE battery id checker"
|
||||
help
|
||||
LGE Battery Id Checker Configuration
|
||||
|
||||
config WIRELESS_CHARGER
|
||||
bool "Wireless Charger Configuration"
|
||||
default n
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
#include <mach/msm_xo.h>
|
||||
#include <mach/msm_hsusb.h>
|
||||
|
||||
#ifdef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
#include <mach/board_lge.h>
|
||||
#endif
|
||||
|
||||
#define CHG_BUCK_CLOCK_CTRL 0x14
|
||||
|
||||
#define PBL_ACCESS1 0x04
|
||||
|
@ -1037,7 +1033,6 @@ static void enable_input_voltage_regulation(struct pm8921_chg_chip *chip)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
static int64_t read_battery_id(struct pm8921_chg_chip *chip)
|
||||
{
|
||||
int rc;
|
||||
|
@ -1053,20 +1048,11 @@ static int64_t read_battery_id(struct pm8921_chg_chip *chip)
|
|||
result.measurement);
|
||||
return result.physical;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int is_battery_valid(struct pm8921_chg_chip *chip)
|
||||
{
|
||||
#ifndef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
int64_t rc;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
if (is_lge_battery())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
#else
|
||||
if (chip->batt_id_min == 0 && chip->batt_id_max == 0)
|
||||
return 1;
|
||||
|
||||
|
@ -1083,7 +1069,6 @@ static int is_battery_valid(struct pm8921_chg_chip *chip)
|
|||
return 0;
|
||||
}
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void check_battery_valid(struct pm8921_chg_chip *chip)
|
||||
|
@ -1417,11 +1402,6 @@ static unsigned int voltage_based_capacity(struct pm8921_chg_chip *chip)
|
|||
|
||||
static int get_prop_batt_present(struct pm8921_chg_chip *chip)
|
||||
{
|
||||
|
||||
#ifdef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
if (is_lge_battery() == false)
|
||||
return 0;
|
||||
#endif
|
||||
return pm_chg_get_rt_status(chip, BATT_INSERTED_IRQ);
|
||||
}
|
||||
|
||||
|
@ -1475,11 +1455,6 @@ static int get_prop_batt_health(struct pm8921_chg_chip *chip)
|
|||
{
|
||||
int temp;
|
||||
|
||||
#ifdef CONFIG_LGE_PM_BATTERY_ID_CHECKER
|
||||
if (is_lge_battery() == false)
|
||||
return POWER_SUPPLY_HEALTH_UNSPEC_FAILURE;
|
||||
#endif
|
||||
|
||||
temp = pm_chg_get_rt_status(chip, BATTTEMP_HOT_IRQ);
|
||||
if (temp)
|
||||
return POWER_SUPPLY_HEALTH_OVERHEAT;
|
||||
|
|
Loading…
Reference in a new issue