power: qpnp-qg: Add QG voltage-only mode

In voltage only mode, QG hardware only samples
the VBAT and SOC is determined based on this. The
V only mode does not support QG the following QG
features - capacity learning, ESR estimation,
TCSS and BASS.

POWER_SUPPLY_FG_TYPE exposes the QG_V or QG_V_I based
QG configuration.

Change-Id: I6207f45f506ab595bd261a297abdd8f40990c8d3
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
This commit is contained in:
Anirudh Ghayal
2020-03-10 22:49:07 +05:30
parent 1c044cbc16
commit 496bb46cf9
5 changed files with 61 additions and 12 deletions

View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
* Copyright (c) 2018, 2020, The Linux Foundation. All rights reserved.
*/
#ifndef __QG_H__
@ -26,7 +26,7 @@ enum qg {
QG_FULL_SOC,
QG_CLEAR_LEARNT_DATA,
QG_SYS_SOC,
QG_RESERVED_10,
QG_V_IBAT,
QG_MAX,
};
@ -39,6 +39,7 @@ enum qg {
#define QG_FULL_SOC QG_FULL_SOC
#define QG_CLEAR_LEARNT_DATA QG_CLEAR_LEARNT_DATA
#define QG_SYS_SOC QG_SYS_SOC
#define QG_V_IBAT QG_V_IBAT
struct fifo_data {
unsigned int v;