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

Commit caceca44 authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

power: smb5: Add snapshot of SMB5 driver and its dependencies



Add snapshot of the QPNP-SMB5 driver, along with its dependencies, as of
msm-4.14 'commit 7e16ff6cdde5 ("defconfig: qcs405: enable WLAN configs
for 32-bit QCS405")'.

Get rid of the use of module parameters in qpnp-smb5.c and battery.c as
they do not scale well for multiple device instances of the same driver.
Instead:
- move debug_mask to debugfs (both files), and
- associate pd_disabled and weak_chg_icl_ua with the device instead,
  using sysfs (only qpnp-smb5.c)

The QPNP-SMB5 driver controls battery charging and other related
functionalities of the PM8150B chip and chips similar to PM8150B.

Change-Id: Ic356e58aaadf810aa279ade59ae11bdc743788d5
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent c7b44586
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -645,4 +645,6 @@ config CHARGER_CROS_USBPD
	  what is connected to USB PD ports from the EC and converts
	  that into power_supply properties.

source "drivers/power/supply/qcom/Kconfig"

endif # POWER_SUPPLY
+1 −0
Original line number Diff line number Diff line
@@ -85,3 +85,4 @@ obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
obj-$(CONFIG_AXP288_FUEL_GAUGE) += axp288_fuel_gauge.o
obj-$(CONFIG_AXP288_CHARGER)	+= axp288_charger.o
obj-$(CONFIG_CHARGER_CROS_USBPD)	+= cros_usbpd-charger.o
obj-$(CONFIG_ARCH_QCOM)		+= qcom/
+18 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

menu "Qualcomm Technologies, Inc. Charger and Fuel Gauge support"

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.

endmenu
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

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
+1755 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading