Commit 75b93d75 authored by Dyneteve's avatar Dyneteve

sm5703_charge: Remove charging limit

Change-Id: Ibf1654f397e22ae81c8874a3650bb1d1f296c2f3
parent c1d96a58
......@@ -72,7 +72,6 @@ CONFIG_BATTERY_SAMSUNG_DATA_FILE="j5_battery_data.h"
CONFIG_SAMSUNG_LPM_MODE=y
CONFIG_FUELGAUGE_SM5703=y
CONFIG_BATTERY_SWELLING=y
CONFIG_SIOP_CHARGING_LIMIT_CURRENT=1200
CONFIG_PREVENT_SOC_JUMP=y
CONFIG_SW_SELF_DISCHARGING=y
CONFIG_CHARGER_SM5703_DUALPATH=y
......
......@@ -77,7 +77,6 @@ CONFIG_BATTERY_SAMSUNG_DATA_FILE="j5_battery_data.h"
CONFIG_SAMSUNG_LPM_MODE=y
CONFIG_FUELGAUGE_SM5703=y
CONFIG_BATTERY_SWELLING=y
CONFIG_SIOP_CHARGING_LIMIT_CURRENT=1000
CONFIG_PREVENT_SOC_JUMP=y
# DUAL SIM / SINGLE SIM Detection
......
......@@ -72,7 +72,6 @@ CONFIG_BATTERY_SAMSUNG_DATA_FILE="j5_battery_data.h"
CONFIG_SAMSUNG_LPM_MODE=y
CONFIG_FUELGAUGE_SM5703=y
CONFIG_BATTERY_SWELLING=y
CONFIG_SIOP_CHARGING_LIMIT_CURRENT=1200
CONFIG_PREVENT_SOC_JUMP=y
CONFIG_SW_SELF_DISCHARGING=y
CONFIG_CHARGER_SM5703_DUALPATH=y
......
......@@ -77,7 +77,6 @@ CONFIG_BATTERY_SAMSUNG_DATA_FILE="j5_battery_data.h"
CONFIG_SAMSUNG_LPM_MODE=y
CONFIG_FUELGAUGE_SM5703=y
CONFIG_BATTERY_SWELLING=y
CONFIG_SIOP_CHARGING_LIMIT_CURRENT=1200
CONFIG_PREVENT_SOC_JUMP=y
CONFIG_SW_SELF_DISCHARGING=y
CONFIG_CHARGER_SM5703_DUALPATH=y
......
......@@ -93,7 +93,6 @@ CONFIG_BATTERY_SAMSUNG_DATA_FILE="j5x_battery_data.h"
CONFIG_SAMSUNG_LPM_MODE=y
CONFIG_FUELGAUGE_SM5703=y
CONFIG_BATTERY_SWELLING=y
CONFIG_SIOP_CHARGING_LIMIT_CURRENT=700
CONFIG_PREVENT_SOC_JUMP=y
CONFIG_SW_SELF_DISCHARGING=y
CONFIG_CHARGER_SM5703_DUALPATH=y
......
......@@ -93,7 +93,6 @@ CONFIG_BATTERY_SAMSUNG_DATA_FILE="j5x_battery_data.h"
CONFIG_SAMSUNG_LPM_MODE=y
CONFIG_FUELGAUGE_SM5703=y
CONFIG_BATTERY_SWELLING=y
CONFIG_SIOP_CHARGING_LIMIT_CURRENT=1200
CONFIG_PREVENT_SOC_JUMP=y
CONFIG_SW_SELF_DISCHARGING=y
CONFIG_CHARGER_SM5703_DUALPATH=y
......
......@@ -63,7 +63,6 @@ CONFIG_BATTERY_SAMSUNG_DATA_FILE="o7_battery_data.h"
CONFIG_SAMSUNG_LPM_MODE=y
CONFIG_FUELGAUGE_SM5703=y
CONFIG_BATTERY_SWELLING=y
CONFIG_SIOP_CHARGING_LIMIT_CURRENT=1200
CONFIG_PREVENT_SOC_JUMP=y
CONFIG_CHARGER_SM5703_SOFT_START_CHARGING=y
CONFIG_CHARGER_SM5703_DUALPATH=y
......
......@@ -49,11 +49,6 @@
#define EN_TEST_READ 1
#endif
#if defined(CONFIG_BATTERY_SWELLING)
#define LIMIT_SWELLING_VOLTAGE 4000
#define LIMIT_SWELLING_CURRENT 300
#endif
static int sm5703_reg_map[] = {
SM5703_INTMSK1,
SM5703_INTMSK2,
......@@ -576,22 +571,15 @@ static void __sm5703_set_termination_current_limit(struct i2c_client *i2c,
static void sm5703_set_charging_current(struct sm5703_charger_data *charger, int topoff)
{
int adj_current = 0;
#ifndef CONFIG_DISABLE_MINIMUM_SIOP_CHARGING
const int usb_charging_current = charger->pdata->charging_current_table[
POWER_SUPPLY_TYPE_USB].fast_charging_current;
#endif
adj_current = charger->charging_current * charger->siop_level / 100;
#ifndef CONFIG_DISABLE_MINIMUM_SIOP_CHARGING
if (adj_current > 0 && adj_current < usb_charging_current)
adj_current = usb_charging_current;
#endif
#if CONFIG_SIOP_CHARGING_LIMIT_CURRENT
if(charger->siop_level < 100 && adj_current > CONFIG_SIOP_CHARGING_LIMIT_CURRENT)
adj_current = CONFIG_SIOP_CHARGING_LIMIT_CURRENT;
#endif
pr_info("%s adj_current = %dmA charger->siop_level = %d\n",__func__, adj_current,charger->siop_level);
mutex_lock(&charger->io_lock);
__sm5703_set_fast_charging_current(charger->sm5703->i2c_client,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment