-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'LA.UM.9.3.r1-02800-sdm845.0' of https://source.codeaurora.…
…org/quic/la/kernel/msm-4.9 into HEAD "LA.UM.9.3.r1-02800-sdm845.0" Change-Id: I41f4c8398ae77c94aa9e9f1c0a2344cbbcb5d41c
- Loading branch information
Showing
8 changed files
with
274 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | ||
/* | ||
* Copyright (c) 2021, The Linux Foundation. All rights reserved. | ||
*/ | ||
|
||
#ifndef __QBG_PROFILE_H__ | ||
#define __QBG_PROFILE_H__ | ||
|
||
#define MAX_BP_LUT_ROWS 35 | ||
#define MAX_BP_LUT_COLS 8 | ||
#define MAX_PROFILE_NAME_LENGTH 256 | ||
|
||
enum profile_table_type { | ||
CHARGE_TABLE = 0, | ||
DISCHARGE_TABLE, | ||
}; | ||
|
||
struct battery_data_table { | ||
unsigned short int table[MAX_BP_LUT_ROWS][MAX_BP_LUT_COLS]; | ||
int unit_conv_factor[MAX_BP_LUT_COLS]; | ||
unsigned short int nrows; | ||
unsigned short int ncols; | ||
}; | ||
|
||
struct battery_config { | ||
char bp_profile_name[MAX_PROFILE_NAME_LENGTH]; | ||
int bp_batt_id; | ||
int capacity; | ||
int bp_checksum; | ||
int soh_range_high; | ||
int soh_range_low; | ||
int normal_impedance; | ||
int aged_impedance; | ||
int normal_capacity; | ||
int aged_capacity; | ||
int recharge_soc_delta; | ||
int recharge_vflt_delta; | ||
int recharge_iterm; | ||
}; | ||
|
||
struct battery_profile_table { | ||
enum profile_table_type table_type; | ||
int table_index; | ||
struct battery_data_table *table; | ||
}; | ||
|
||
/* IOCTLs to query battery profile data */ | ||
/* Battery configuration */ | ||
#define BPIOCXBP \ | ||
_IOWR('B', 0x01, struct battery_config) | ||
/* Battery profile table */ | ||
#define BPIOCXBPTABLE \ | ||
_IOWR('B', 0x02, struct battery_profile_table) | ||
|
||
#endif |
Oops, something went wrong.