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

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

Merge changes Ia2d0eca6,Ifb0608c4,I69fa0ed1 into msm-4.14

* changes:
  defconfig: Enable BCL driver for SDM855
  drivers: thermal: bcl-pmic5: Add support for BCL-LMH Level interrupt
  drivers: bcl-pmic5: Add a BCL driver for the BCL Peripheral
parents 9370ef37 c26190bb
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
===============================================================================
BCL Peripheral driver for PMIC5:
===============================================================================
Qualcomm Technologies, Inc's PMIC has battery current limiting peripheral,
which can monitor for high battery current and low battery voltage in the
hardware. The BCL peripheral driver interacts with the PMIC peripheral using
the SPMI driver interface. The hardware can take threshold for notifying for
high battery current or low battery voltage events. This driver works only
with PMIC version 5, where the same BCL peripheral can be found in multiple
PMIC's that are used in a device, with limited functionalities. For example,
one PMIC can have only vbat monitoring, while the other PMIC can have both
vbat and ibat monitoring. This is a common driver, that can interact
with the multiple BCL peripherals.

Required Parameters:
- compatible: must be
	'qcom,bcl-v5' for bcl peripheral in PMIC version 5.
- reg: <a b> where 'a' is the starting register address of the PMIC
	peripheral and 'b' is the size of the peripheral address space.
- interrupts: <a b c d> Where,
		'a' is the SLAVE ID of the PMIC,
		'b' is the peripheral ID,
		'c' is the interrupt number in PMIC and
		'd' is the interrupt type.
- interrupt-names: user defined names for the interrupts. These
		interrupt names will be used by the drivers to identify the
		interrupts, instead of specifying the ID's. bcl driver will
		accept these standard interrupts.
		"bcl-ibat-lvl0",
		"bcl-ibat-lvl1",
		"bcl-vbat-lvl0",
		"bcl-vbat-lvl1",
		"bcl-vbat-lvl2",

Example:
		bcl@4200 {
			compatible = "qcom,bcl-v5";
			reg = <0x4200 0x100>;
			interrupts = <0x2 0x42 0x0 IRQ_TYPE_NONE>,
					<0x2 0x42 0x1 IRQ_TYPE_NONE>;
			interrupt-names = "bcl-ibat-lvl0",
						"bcl-vbat-lvl0";
		};
+2 −0
Original line number Diff line number Diff line
@@ -317,6 +317,8 @@ CONFIG_QTI_THERMAL_LIMITS_DCVS=y
CONFIG_QTI_VIRTUAL_SENSOR=y
CONFIG_QTI_AOP_REG_COOLING_DEVICE=y
CONFIG_REGULATOR_COOLING_DEVICE=y
CONFIG_QTI_BCL_PMIC5=y
CONFIG_QTI_BCL_SOC_DRIVER=y
CONFIG_MFD_SPMI_PMIC=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_QPNP_LCDB=y
+2 −0
Original line number Diff line number Diff line
@@ -326,6 +326,8 @@ CONFIG_QTI_THERMAL_LIMITS_DCVS=y
CONFIG_QTI_VIRTUAL_SENSOR=y
CONFIG_QTI_AOP_REG_COOLING_DEVICE=y
CONFIG_REGULATOR_COOLING_DEVICE=y
CONFIG_QTI_BCL_PMIC5=y
CONFIG_QTI_BCL_SOC_DRIVER=y
CONFIG_MFD_SPMI_PMIC=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_QPNP_LCDB=y
+11 −0
Original line number Diff line number Diff line
@@ -62,6 +62,17 @@ config REGULATOR_COOLING_DEVICE

	  If you want this support, you should say Y here.

config QTI_BCL_PMIC5
	bool "BCL driver for BCL peripherals in PMIC5"
	depends on SPMI && THERMAL_OF
	help
	  Say Y here to enable this BCL driver for PMIC5. This driver
	  provides routines to configure and monitor the BCL
	  PMIC peripheral. This driver registers the battery current and
	  voltage sensors with the thermal core framework and can take
	  threshold input and notify the thermal core when the threshold is
	  reached.

config MSM_BCL_PERIPHERAL_CTL
	bool "BCL driver to control the PMIC BCL peripheral"
	depends on SPMI && THERMAL_OF
+1 −0
Original line number Diff line number Diff line
@@ -6,4 +6,5 @@ obj-$(CONFIG_QTI_AOP_REG_COOLING_DEVICE) += regulator_aop_cdev.o
obj-$(CONFIG_REGULATOR_COOLING_DEVICE) += regulator_cdev.o
obj-$(CONFIG_QTI_QMI_COOLING_DEVICE) += thermal_mitigation_device_service_v01.o qmi_cooling.o
obj-$(CONFIG_MSM_BCL_PERIPHERAL_CTL) += bcl_peripheral.o
obj-$(CONFIG_QTI_BCL_PMIC5) += bcl_pmic5.o
obj-$(CONFIG_QTI_BCL_SOC_DRIVER) += bcl_soc.o
Loading