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

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

Merge "power: smb349-charger: Add smb349 charger driver"

parents bb7505b1 cfecfde6
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
Summit smb349 battery charger

SMB349 is a single-cell battery charger. It can charge
the battery and power the system via the USB/AC adapter input.

The smb349 interface is via I2C bus.

Required Properties:
- compatible:			Must be "qcom,smb349-charger".
- reg:				The device 7-bit I2C address.

Optional Properties:

- interrupts			This indicates the IRQ number of the GPIO
				connected to the STAT pin.
- qcom,chg-valid-gpio		GPIO which indicates the charger presence.
				This GPIO is connected to the SYSOK pin.
- qcom,fastchg-current-max-ma Fast Charging current in mA. Supported range is
				from 1000mA to 4000mA.
- qcom,chg-autonomous-mode	This is a bool property and it indicates that the
				charger is configured for autonomous operation and
				does not require any software configuration.
- qcom,enable-chg-type-detection This is bool property and it indicates
				if charger detection is supported by this
				driver.
- qcom,disable-apsd		This is a bool property which disables Automatic
				power source detection (apsd). If this is set
				charger detection is done by DCIN UV irq.
- qcom,charger-disabled	This is a bool property which disables charging.

- qcom,reload-smb-config	This is a bool property to indicate if the
				smb register configuration needs to be reloaded
				when the charger is removed.
- qcom,bms-psy-name		This is a string and it points to the bms
				power supply name.

Example:
	i2c@f9967000 {
		smb349-charger@1b {
			compatible = "qcom,smb349-charger";
			reg = <0x1b>;
			interrupt-parent = <&msmgpio>;
			interrupts = <48 0x0>;
			qcom,chg-valid-gpio = <&msm_gpio 13 0x00>;
			qcom,fastchg-current-max-ma = <3500>;
			qcom,chg-autonomous-mode;
			qcom,bms-psy-name = "bms";
		};
	};
+10 −0
Original line number Diff line number Diff line
@@ -416,6 +416,16 @@ config SMB349_CHARGER
	  SMB349 be operated as a slave device via the power supply
	  framework.

config SMB349_USB_CHARGER
	tristate "smb349 usb charger (with VBUS detection)"
	depends on I2C
	help
	 Say Y to enable support for the SMB349 switching mode based charger.
	 The driver supports charging control (enable/disable) and
	 charge-current limiting. It also provides USB VBUS detection and
	 notification support. The driver controls SMB349 via I2C and
	 supports device-tree interface.

config SMB350_CHARGER
	tristate "smb350 charger"
	depends on I2C
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ obj-$(CONFIG_BATTERY_MSM8X60) += msm_charger.o
obj-$(CONFIG_PM8058_CHARGER)    += pmic8058-charger.o
obj-$(CONFIG_ISL9519_CHARGER)   += isl9519q.o
obj-$(CONFIG_SMB349_CHARGER)   += smb349.o
obj-$(CONFIG_SMB349_USB_CHARGER)   += smb349-charger.o
obj-$(CONFIG_SMB350_CHARGER)   += smb350_charger.o
obj-$(CONFIG_PM8058_FIX_USB)    += pm8058_usb_fix.o
obj-$(CONFIG_BATTERY_QCIBAT)    += qci_battery.o
+1291 −0

File added.

Preview size limit exceeded, changes collapsed.