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

Commit 58bfbabe authored by Jishnu Prakash's avatar Jishnu Prakash Committed by Gerrit - the friendly Code Review server
Browse files

power: supply: qcom: Add snapshot of SMB5 charger driver



Add snapshot of qpnp-smb5 charger driver from msm-4.19
as of commit 1bb7bbeb1d09("sched: Fix compilation errors
with !WALT").

Change-Id: Ie7c99bea8887dcb97244e43e7984e2a82d1e5526
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent 3be2db00
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -15,4 +15,17 @@ config QPNP_QG
	  to determine the battery state-of-charge (SOC) and supports other
	  battery management features.

config QPNP_SMB5
	tristate "SMB5 Battery Charger"
	depends on MFD_SPMI_PMIC
	help
	  Say Y to enables support for the SMB5 charging peripheral.
	  The QPNP SMB5 charger driver supports the charger peripheral
	  present in the chip.
	  The power supply framework is used to communicate battery and
	  usb properties to userspace and other driver consumers such
	  as fuel gauge, USB, and USB-PD.
	  VBUS and VCONN regulators are registered for supporting OTG,
	  and powered Type-C cables respectively.

endif
+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

obj-$(CONFIG_QPNP_QG)	+= qpnp-qg.o battery-profile-loader.o pmic-voter.o qg-util.o qg-soc.o qg-sdam.o qg-battery-profile.o qg-profile-lib.o fg-alg.o
obj-$(CONFIG_QPNP_SMB5)	+= step-chg-jeita.o battery.o qpnp-smb5.o smb5-lib.o pmic-voter.o storm-watch.o schgm-flash.o
+2118 −0

File added.

Preview size limit exceeded, changes collapsed.

+19 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2017, 2019-2020 The Linux Foundation. All rights reserved.
 */
#ifndef __BATTERY_H
#define __BATTERY_H

struct charger_param {
	u32 fcc_step_delay_ms;
	u32 fcc_step_size_ua;
	u32 smb_version;
	u32 hvdcp2_max_icl_ua;
	u32 hvdcp3_max_icl_ua;
	u32 forced_main_fcc;
};

int qcom_batt_init(struct charger_param *param);
void qcom_batt_deinit(void);
#endif /* __BATTERY_H */
+3780 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading