[PATCH RFC 03/11] mfd: max77693: Add defines for charger current control

Artur Weber aweber.kernel at gmail.com
Thu May 30 01:55:53 PDT 2024


From: Wolfgang Wiedmeyer <wolfgit at wiedmeyer.de>

This prepares for an updated regulator and charger driver. The defines
are needed to set the maximum input current and the fast charge
current.

Signed-off-by: Wolfgang Wiedmeyer <wolfgit at wiedmeyer.de>
[GNUtoo at cyberdimension.org: small fix]
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
[Artur: swap hardcoded ILIM values for DEFAULT_FAST_CHARGE_CURRENT]
Signed-off-by: Artur Weber <aweber.kernel at gmail.com>
---
 include/linux/mfd/max77693-private.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
index 54444ff2a5de..4570646e2f33 100644
--- a/include/linux/mfd/max77693-private.h
+++ b/include/linux/mfd/max77693-private.h
@@ -145,6 +145,8 @@ enum max77693_pmic_reg {
 #define DEFAULT_THERMAL_REGULATION_TEMP		100
 /* microamps */
 #define DEFAULT_BATTERY_OVERCURRENT		3500000
+/* microamps */
+#define DEFAULT_FAST_CHARGE_CURRENT		500000
 /* microvolts */
 #define DEFAULT_CHARGER_INPUT_THRESHOLD_VOLT	4300000
 
@@ -217,6 +219,10 @@ enum max77693_charger_battery_state {
 #define CHG_CNFG_01_CHGRSTRT_MASK	(0x3 << CHG_CNFG_01_CHGRSTRT_SHIFT)
 #define CHG_CNFG_01_PQEN_MAKS		BIT(CHG_CNFG_01_PQEN_SHIFT)
 
+/* MAX77693_CHG_REG_CHG_CNFG_02 register */
+#define CHG_CNFG_02_CC_SHIFT		0
+#define CHG_CNFG_02_CC_MASK		0x3F
+
 /* MAX77693_CHG_REG_CHG_CNFG_03 register */
 #define CHG_CNFG_03_TOITH_SHIFT		0
 #define CHG_CNFG_03_TOTIME_SHIFT	3

-- 
2.45.1




More information about the linux-arm-kernel mailing list