Merge "power: vm-bms: Remove voltage_soc_timeout_work from vm-bms"
This commit is contained in:
commit
8e3a8759bd
2 changed files with 0 additions and 33 deletions
|
|
@ -57,9 +57,6 @@ Parent node required properties:
|
|||
- qcom,calculate-soc-ms : The time period between subsequent SoC
|
||||
recalculations when the current SoC is above or equal
|
||||
qcom,low-soc-calculate-soc-threshold.
|
||||
- qcom,volatge-soc-timeout-ms : The timeout period after which the module starts
|
||||
reporting volage based SOC and does not use the VMBMS
|
||||
algorithm for SOC calculation.
|
||||
- qcom,bms-vadc: Corresponding VADC device's phandle.
|
||||
- qcom,bms-adc_tm: Corresponding ADC_TM device's phandle to set recurring
|
||||
measurements and receive notifications for vbatt.
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ struct bms_dt_cfg {
|
|||
int cfg_low_voltage_calculate_soc_ms;
|
||||
int cfg_low_soc_fifo_length;
|
||||
int cfg_calculate_soc_ms;
|
||||
int cfg_voltage_soc_timeout_ms;
|
||||
int cfg_s1_sample_interval_ms;
|
||||
int cfg_s2_sample_interval_ms;
|
||||
int cfg_s1_sample_count;
|
||||
|
|
@ -258,7 +257,6 @@ struct qpnp_bms_chip {
|
|||
struct bms_wakeup_source vbms_soc_wake_source;
|
||||
wait_queue_head_t bms_wait_q;
|
||||
struct delayed_work monitor_soc_work;
|
||||
struct delayed_work voltage_soc_timeout_work;
|
||||
struct mutex bms_data_mutex;
|
||||
struct mutex bms_device_mutex;
|
||||
struct mutex last_soc_mutex;
|
||||
|
|
@ -2199,20 +2197,6 @@ static void monitor_soc_work(struct work_struct *work)
|
|||
bms_relax(&chip->vbms_soc_wake_source);
|
||||
}
|
||||
|
||||
static void voltage_soc_timeout_work(struct work_struct *work)
|
||||
{
|
||||
struct qpnp_bms_chip *chip = container_of(work,
|
||||
struct qpnp_bms_chip,
|
||||
voltage_soc_timeout_work.work);
|
||||
|
||||
mutex_lock(&chip->bms_device_mutex);
|
||||
if (!chip->bms_dev_open) {
|
||||
pr_warn("BMS device not opened, using voltage based SOC\n");
|
||||
chip->dt.cfg_use_voltage_soc = true;
|
||||
}
|
||||
mutex_unlock(&chip->bms_device_mutex);
|
||||
}
|
||||
|
||||
#define DEBUG_BOARD_SOC 67
|
||||
#define BATT_MISSING_SOC 50
|
||||
static int get_prop_bms_capacity(struct qpnp_bms_chip *chip)
|
||||
|
|
@ -3397,7 +3381,6 @@ static int show_bms_config(struct seq_file *m, void *data)
|
|||
"low_voltage_threshold\t=\t%d\n"
|
||||
"low_voltage_calculate_soc_ms\t=\t%d\n"
|
||||
"calculate_soc_ms\t=\t%d\n"
|
||||
"voltage_soc_timeout_ms\t=\t%d\n"
|
||||
"ignore_shutdown_soc\t=\t%d\n"
|
||||
"shutdown_soc_valid_limit\t=\t%d\n"
|
||||
"force_s3_on_suspend\t=\t%d\n"
|
||||
|
|
@ -3419,7 +3402,6 @@ static int show_bms_config(struct seq_file *m, void *data)
|
|||
chip->dt.cfg_low_voltage_threshold,
|
||||
chip->dt.cfg_low_voltage_calculate_soc_ms,
|
||||
chip->dt.cfg_calculate_soc_ms,
|
||||
chip->dt.cfg_voltage_soc_timeout_ms,
|
||||
chip->dt.cfg_ignore_shutdown_soc,
|
||||
chip->dt.cfg_shutdown_soc_valid_limit,
|
||||
chip->dt.cfg_force_s3_on_suspend,
|
||||
|
|
@ -3758,8 +3740,6 @@ static int parse_bms_dt_properties(struct qpnp_bms_chip *chip)
|
|||
"low-voltage-calculate-soc-ms", rc);
|
||||
PROP_READ(cfg_calculate_soc_ms, "calculate-soc-ms", rc);
|
||||
PROP_READ(cfg_low_voltage_threshold, "low-voltage-threshold", rc);
|
||||
PROP_READ(cfg_voltage_soc_timeout_ms,
|
||||
"volatge-soc-timeout-ms", rc);
|
||||
|
||||
if (rc) {
|
||||
pr_err("Missing required properties rc=%d\n", rc);
|
||||
|
|
@ -4000,8 +3980,6 @@ static int qpnp_vm_bms_probe(struct platform_device *pdev)
|
|||
wakeup_source_init(&chip->vbms_cv_wake_source.source, "vbms_cv_wake");
|
||||
wakeup_source_init(&chip->vbms_soc_wake_source.source, "vbms_soc_wake");
|
||||
INIT_DELAYED_WORK(&chip->monitor_soc_work, monitor_soc_work);
|
||||
INIT_DELAYED_WORK(&chip->voltage_soc_timeout_work,
|
||||
voltage_soc_timeout_work);
|
||||
|
||||
bms_init_defaults(chip);
|
||||
bms_load_hw_defaults(chip);
|
||||
|
|
@ -4106,14 +4084,6 @@ static int qpnp_vm_bms_probe(struct platform_device *pdev)
|
|||
|
||||
schedule_delayed_work(&chip->monitor_soc_work, 0);
|
||||
|
||||
/*
|
||||
* schedule a work to check if the userspace vmbms module
|
||||
* has registered. Fall-back to voltage-based-soc reporting
|
||||
* if it has not.
|
||||
*/
|
||||
schedule_delayed_work(&chip->voltage_soc_timeout_work,
|
||||
msecs_to_jiffies(chip->dt.cfg_voltage_soc_timeout_ms));
|
||||
|
||||
pr_info("probe success: soc=%d vbatt=%d ocv=%d warm_reset=%d\n",
|
||||
get_prop_bms_capacity(chip), vbatt,
|
||||
chip->last_ocv_uv, chip->warm_reset);
|
||||
|
|
|
|||
Loading…
Reference in a new issue