You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
kernel_samsung_sm7125/drivers/power/supply/qcom_r1/step-chg-jeita.h

46 lines
1.3 KiB

/* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __STEP_CHG_H__
#define __STEP_CHG_H__
#define MAX_STEP_CHG_ENTRIES 8
#if defined(CONFIG_BATTERY_SAMSUNG_USING_QC)
#define NOT_CHANGE_RECHG 0
#define CHANGE_RECHG 1
#define RECHG_COOL 4200
#define RECHG_NORMAL 4280
#define RECHG_WARM 4000
#endif
struct step_chg_jeita_param {
u32 psy_prop;
char *prop_name;
int hysteresis;
bool use_bms;
};
struct range_data {
u32 low_threshold;
u32 high_threshold;
u32 value;
};
int qcom_step_chg_init(struct device *dev,
bool step_chg_enable, bool sw_jeita_enable, bool jeita_arb_en);
void qcom_step_chg_deinit(void);
int read_range_data_from_node(struct device_node *node,
const char *prop_str, struct range_data *ranges,
u32 max_threshold, u32 max_value);
#endif /* __STEP_CHG_H__ */