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.
61 lines
1.7 KiB
61 lines
1.7 KiB
/*
|
|
* sec_battery.h
|
|
* Samsung Mobile Battery Header
|
|
*
|
|
*
|
|
* Copyright (C) 2012 Samsung Electronics, Inc.
|
|
*
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* 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 __SEC_BATTERY_TTF_H
|
|
#define __SEC_BATTERY_TTF_H __FILE__
|
|
|
|
struct sec_cv_slope {
|
|
int fg_current;
|
|
int soc;
|
|
int time;
|
|
};
|
|
|
|
struct sec_battery_info;
|
|
|
|
struct sec_ttf_data {
|
|
void *pdev;
|
|
int timetofull;
|
|
|
|
unsigned int ttf_hv_12v_charge_current;
|
|
unsigned int ttf_hv_charge_current;
|
|
unsigned int ttf_hv_12v_wireless_charge_current;
|
|
unsigned int ttf_hv_wireless_charge_current;
|
|
unsigned int ttf_wireless_charge_current;
|
|
unsigned int ttf_dc25_charge_current;
|
|
unsigned int ttf_dc45_charge_current;
|
|
unsigned int ttf_predict_wc20_charge_current;
|
|
|
|
struct sec_cv_slope *cv_data;
|
|
int cv_data_length;
|
|
unsigned int ttf_capacity;
|
|
|
|
struct delayed_work timetofull_work;
|
|
};
|
|
|
|
int sec_calc_ttf(struct sec_battery_info *battery, unsigned int ttf_curr);
|
|
extern void sec_bat_calc_time_to_full(struct sec_battery_info *battery);
|
|
extern void sec_bat_time_to_full_work(struct work_struct *work);
|
|
extern void ttf_init(struct sec_battery_info *battery);
|
|
extern void ttf_work_start(struct sec_battery_info *battery);
|
|
extern int ttf_display(struct sec_battery_info *battery);
|
|
#ifdef CONFIG_OF
|
|
int sec_ttf_parse_dt(struct sec_battery_info *battery);
|
|
#endif
|
|
|
|
#endif /* __SEC_BATTERY_H */
|
|
|