blob: f57799ec159bfe4c6f2257beb4e9412c7e79265d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
*/
#ifndef __QG_PROFILE_LIB_H__
#define __QG_PROFILE_LIB_H__
struct profile_table_data {
char *name;
int rows;
int cols;
int *row_entries;
int *col_entries;
int **data;
};
int qg_linear_interpolate(int y0, int x0, int y1, int x1, int x);
int qg_interpolate_single_row_lut(struct profile_table_data *lut,
int x, int scale);
int qg_interpolate_soc(struct profile_table_data *lut,
int batt_temp, int ocv);
int qg_interpolate_var(struct profile_table_data *lut,
int batt_temp, int soc);
int qg_interpolate_slope(struct profile_table_data *lut,
int batt_temp, int soc);
#endif /*__QG_PROFILE_LIB_H__ */
|