qcom: qnovo: Add property to report charge errors
Report status that indicates individual charger errors, including JEITA, battery, charing disabled, etc. Change-Id: I5a02d9f86237ae1a05b71e78f17db8c39f35594f Signed-off-by: Harry Yang <harryy@codeaurora.org>
This commit is contained in:
parent
8ae4a028b6
commit
9ac55848ca
1 changed files with 10 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
#define QNOVO_PTRAIN_STS 0x08
|
#define QNOVO_PTRAIN_STS 0x08
|
||||||
#define QNOVO_ERROR_STS 0x09
|
#define QNOVO_ERROR_STS 0x09
|
||||||
#define QNOVO_ERROR_BIT BIT(0)
|
#define QNOVO_ERROR_BIT BIT(0)
|
||||||
|
#define QNOVO_ERROR_STS2 0x0A
|
||||||
#define QNOVO_INT_RT_STS 0x10
|
#define QNOVO_INT_RT_STS 0x10
|
||||||
#define QNOVO_INT_SET_TYPE 0x11
|
#define QNOVO_INT_SET_TYPE 0x11
|
||||||
#define QNOVO_INT_POLARITY_HIGH 0x12
|
#define QNOVO_INT_POLARITY_HIGH 0x12
|
||||||
|
@ -350,6 +351,7 @@ enum {
|
||||||
PE_CTRL2_REG,
|
PE_CTRL2_REG,
|
||||||
PTRAIN_STS_REG,
|
PTRAIN_STS_REG,
|
||||||
INT_RT_STS_REG,
|
INT_RT_STS_REG,
|
||||||
|
ERR_STS2_REG,
|
||||||
PREST1,
|
PREST1,
|
||||||
PPULS1,
|
PPULS1,
|
||||||
NREST1,
|
NREST1,
|
||||||
|
@ -425,6 +427,12 @@ static struct param_info params[] = {
|
||||||
.num_regs = 1,
|
.num_regs = 1,
|
||||||
.units_str = "",
|
.units_str = "",
|
||||||
},
|
},
|
||||||
|
[ERR_STS2_REG] = {
|
||||||
|
.name = "RAW_CHGR_ERR",
|
||||||
|
.start_addr = QNOVO_ERROR_STS2,
|
||||||
|
.num_regs = 1,
|
||||||
|
.units_str = "",
|
||||||
|
},
|
||||||
[PREST1] = {
|
[PREST1] = {
|
||||||
.name = "PREST1",
|
.name = "PREST1",
|
||||||
.start_addr = QNOVO_PREST1_CTRL,
|
.start_addr = QNOVO_PREST1_CTRL,
|
||||||
|
@ -1076,6 +1084,8 @@ static struct class_attribute qnovo_attributes[] = {
|
||||||
reg_show, NULL),
|
reg_show, NULL),
|
||||||
[INT_RT_STS_REG] = __ATTR(INT_RT_STS_REG, 0444,
|
[INT_RT_STS_REG] = __ATTR(INT_RT_STS_REG, 0444,
|
||||||
reg_show, NULL),
|
reg_show, NULL),
|
||||||
|
[ERR_STS2_REG] = __ATTR(ERR_STS2_REG, 0444,
|
||||||
|
reg_show, NULL),
|
||||||
[PREST1] = __ATTR(PREST1_mS, 0644,
|
[PREST1] = __ATTR(PREST1_mS, 0644,
|
||||||
time_show, time_store),
|
time_show, time_store),
|
||||||
[PPULS1] = __ATTR(PPULS1_uC, 0644,
|
[PPULS1] = __ATTR(PPULS1_uC, 0644,
|
||||||
|
|
Loading…
Add table
Reference in a new issue