Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 437798cd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-qg: Update PON_OCV and GOOD_OCV handling"

parents 3dc6198a 121e09ce
Loading
Loading
Loading
Loading
+471 −457

File changed.

Preview size limit exceeded, changes collapsed.

+474 −489

File changed.

Preview size limit exceeded, changes collapsed.

+4 −2
Original line number Diff line number Diff line
@@ -115,8 +115,10 @@ struct qpnp_qg {
};

enum ocv_type {
	PON_OCV,
	GOOD_OCV,
	S7_PON_OCV,
	S3_GOOD_OCV,
	S3_LAST_OCV,
	SDAM_PON_OCV,
};

enum debug_mask {
+2 −0
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@

#define V_RAW_TO_UV(V_RAW)		div_u64(194637ULL * (u64)V_RAW, 1000)
#define I_RAW_TO_UA(I_RAW)		div_s64(152588LL * (s64)I_RAW, 1000)
#define FIFO_V_RESET_VAL		0x8000
#define FIFO_I_RESET_VAL		0x8000

#define DEGC_SCALE			10
#define UV_TO_DECIUV(a)			(a / 100)
+3 −0
Original line number Diff line number Diff line
@@ -77,6 +77,8 @@
#define QG_LAST_ADC_V_DATA0_REG			0xC0
#define QG_LAST_ADC_I_DATA0_REG			0xC2

#define QG_LAST_S3_SLEEP_V_DATA0_REG		0xCC

/* SDAM offsets */
#define QG_SDAM_VALID_OFFSET			0x46
#define QG_SDAM_SOC_OFFSET			0x47
@@ -85,5 +87,6 @@
#define QG_SDAM_OCV_OFFSET			0x4C
#define QG_SDAM_IBAT_OFFSET			0x50
#define QG_SDAM_TIME_OFFSET			0x54
#define QG_SDAM_PON_OCV_OFFSET			0x7C

#endif
Loading