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

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

Merge "drivers: bcl_peripheral: Register with thermal core framework" into msm-4.9

parents ba50df83 c4433496
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
===============================================================================
BCL PMIC Peripheral driver:
===============================================================================
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.

Required Parameters:
- compatible: must be
	'qcom,msm-bcl-lmh' for bcl peripheral with LMH DCVSh interface.
- reg: <a b> where 'a' is the starting register address of the PMIC
	peripheral and 'b' is the size of the peripheral address space.
	If the BCL inhibit current derating feature is enabled, this must also
	have the PON spare registers as well. Example: <a b c d> where
	c is the first PON spare register that will be written and d is the
	size of the registers space needed to be written. Certain version
	of PMIC, can send interrupt to LMH hardware driver directly. In that
	case the shadow peripheral address space should be mentioned along
	with the bcl peripherals address.
- interrupts: <a b c> Where 'a' is the SLAVE ID of the PMIC, 'b' is
		the peripheral ID and 'c' is the interrupt number in PMIC.
- 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 five standard interrupts.
		"bcl-low-vbat"
		"bcl-very-low-vbat"
		"bcl-crit-low-vbat"
		"bcl-high-ibat"
		"bcl-very-high-ibat"


Optional Parameters:

		bcl@4200 {
			compatible = "qcom,msm-bcl";
			reg = <0x4200 0xFF 0x88e 0x2>;
			interrupts = <0x2 0x42 0x0>,
					<0x2 0x42 0x1>;
			interrupt-names = "bcl-high-ibat-int",
						"bcl-low-vbat-int";
		};
+11 −0
Original line number Diff line number Diff line
@@ -9,3 +9,14 @@ config QCOM_TSENS
	  thermal zone device via the mode file results in disabling the sensor.
	  Also able to set threshold temperature for both hot and cold and update
	  when a threshold is reached.

config MSM_BCL_PERIPHERAL_CTL
	bool "BCL driver to control the PMIC BCL peripheral"
	depends on SPMI && THERMAL_OF
	help
	  Say Y here to enable this BCL PMIC peripheral driver. 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.
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_QCOM_TSENS)	+= qcom_tsens.o
qcom_tsens-y			+= tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-8996.o
obj-$(CONFIG_MSM_BCL_PERIPHERAL_CTL) += bcl_peripheral.o
+787 −0

File added.

Preview size limit exceeded, changes collapsed.