Skip to contentSkip to conversation

regulator: max8973: add support for junction thermal warning

PATCH In review Laxman Dewangan 3 participants 5 messages Jan 6, 2016 – Feb 12, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 regulator: max8973: add support for junction thermal warning

The driver MAX8973 supports the driver for Maxim PMIC MAX77621. MAX77621 supports the junction temp warning at 120 degC and 140 degC which is configurable. It generates alert signal when junction temperature crosses these threshold.

MAX77621 does not support the continuous temp monitoring of junction temperature. It just report whether junction temperature crossed the threshold or not.

Add support to
- Configure junction temp warning threshold via DT property to generate alert when it crosses the threshold.
- Add support to interrupt the host from this device when alert occurred.
- read the junction temp via thermal framework.

---
Changes from v1:
- Remove irq flags from DT
- More details about supported temp by MAX77621

 .../bindings/regulator/max8973-regulator.txt       |   5 +
 drivers/regulator/max8973-regulator.c              | 140 ++++++++++++++++++++-
 include/linux/regulator/max8973-regulator.h        |   4 +
 3 files changed, 147 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/max8973-regulator.txt +5 -0
index f80ea2f..93f9939 100644
@@ -31,6 +31,11 @@ Optional properties:
 		property is available then etr will be enable default.
 
 Enhanced transient response (ETR) will affect the configuration of CKADV.
+-maxim,junction-temp-warning: Junction temp warning on which device generates
+		warning interrupts. This is in millicelcius.
+
+Please note that thermal functionality is only supported on MAX77621. The
+threshold warning supported by MAX77621 are 120 degC and 140 degC.
 
 Example:
 
drivers/regulator/max8973-regulator.c +138 -2

220 lines not on this page · raw message

include/linux/regulator/max8973-regulator.h +4 -0
index f6a8a16..abde9c4 100644
@@ -54,6 +54,9 @@
  * @reg_init_data: The regulator init data.
  * @control_flags: Control flags which are ORed value of above flags to
  *		configure device.
+ * @junction_temp_warning: Junction temp in millicelcius on which warning need
+ *		to be set. Thermal functionality is only supported on MAX77621.
+ *		The threshold warning supported by MAX77621 are 120C and 140C.
  * @enable_ext_control: Enable the voltage enable/disable through external
  *		control signal from EN input pin. If it is false then
  *		voltage output will be enabled/disabled through EN bit of
@@ -67,6 +70,7 @@
 struct max8973_regulator_platform_data {
 	struct regulator_init_data *reg_init_data;
 	unsigned long control_flags;
+	int junction_temp_warning;
 	bool enable_ext_control;
 	int enable_gpio;
 	int dvs_gpio;
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#1 lore raw

Applied "regulator: max8973: add support for junction thermal warning" to the regulator tree

The patch

regulator: max8973: add support for junction thermal warning

has been applied to the regulator tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 1b7a4c6a9eeaa2d44186da98270d325a3857b88b Mon Sep 17 00:00:00 2001

From: Laxman Dewangan <[email protected]>
Date: Wed, 6 Jan 2016 21:37:20 +0530
Subject: [PATCH] regulator: max8973: add support for junction thermal warning

The driver MAX8973 supports the driver for Maxim PMIC MAX77621. MAX77621 supports the junction temp warning at 120 degC and 140 degC which is configurable. It generates alert signal when junction temperature crosses these threshold.

MAX77621 does not support the continuous temp monitoring of junction temperature. It just report whether junction temperature crossed the threshold or not.

Add support to
- Configure junction temp warning threshold via DT property to generate alert when it crosses the threshold.
- Add support to interrupt the host from this device when alert occurred.
- read the junction temp via thermal framework.

---
 .../bindings/regulator/max8973-regulator.txt       |   5 +
 drivers/regulator/max8973-regulator.c              | 140 ++++++++++++++++++++-
 include/linux/regulator/max8973-regulator.h        |   4 +
 3 files changed, 147 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/max8973-regulator.txt +5 -0
index f80ea2fe27e6..93f9939115af 100644
@@ -31,6 +31,11 @@ Optional properties:
 		property is available then etr will be enable default.
 
 Enhanced transient response (ETR) will affect the configuration of CKADV.
+-maxim,junction-temp-warning: Junction temp warning on which device generates
+		warning interrupts. This is in millicelcius.
+
+Please note that thermal functionality is only supported on MAX77621. The
+threshold warning supported by MAX77621 are 120 degC and 140 degC.
 
 Example:
 
drivers/regulator/max8973-regulator.c +138 -2

220 lines not on this page · raw message

include/linux/regulator/max8973-regulator.h +4 -0
index f6a8a16a0d4d..abde9c4941cf 100644
@@ -54,6 +54,9 @@
  * @reg_init_data: The regulator init data.
  * @control_flags: Control flags which are ORed value of above flags to
  *		configure device.
+ * @junction_temp_warning: Junction temp in millicelcius on which warning need
+ *		to be set. Thermal functionality is only supported on MAX77621.
+ *		The threshold warning supported by MAX77621 are 120C and 140C.
  * @enable_ext_control: Enable the voltage enable/disable through external
  *		control signal from EN input pin. If it is false then
  *		voltage output will be enabled/disabled through EN bit of
@@ -67,6 +70,7 @@
 struct max8973_regulator_platform_data {
 	struct regulator_init_data *reg_init_data;
 	unsigned long control_flags;
+	int junction_temp_warning;
 	bool enable_ext_control;
 	int enable_gpio;
 	int dvs_gpio;
Signature · 1 line
2.7.0.rc3
#3 lore raw
In reply to Rob Herring
Quoted 7 lines · Rob Herring

On Wed, Jan 6, 2016 at 10:07 AM, Laxman Dewangan <[email protected]> wrote:

Enhanced transient response (ETR) will affect the configuration of CKADV.

+-maxim,junction-temp-warning: Junction temp warning on which device generates
+               warning interrupts. This is in millicelcius.

Please append units: maxim,junction-temp-warning-millicelsius or perhaps maxim,junction-warn-millicelsius to shorten it a bit.

This is very generic which is there on most of PMIC devices from Maxim, TI etc. So can we make it generic i.e. do not prefix with vendor name like "junction-warn-millicelsius"?

#2 lore raw
In reply to Laxman Dewangan
Quoted 4 lines · Laxman Dewangan

The driver MAX8973 supports the driver for Maxim PMIC MAX77621. MAX77621 supports the junction temp warning at 120 degC and 140 degC which is configurable. It generates alert signal when junction temperature crosses these threshold.

Sorry, this one fell thru the cracks.

Quoted 27 lines

MAX77621 does not support the continuous temp monitoring of junction temperature. It just report whether junction temperature crossed the threshold or not.

Add support to
- Configure junction temp warning threshold via DT property to generate alert when it crosses the threshold.
- Add support to interrupt the host from this device when alert occurred.
- read the junction temp via thermal framework.

---
Changes from v1:
- Remove irq flags from DT
- More details about supported temp by MAX77621

 .../bindings/regulator/max8973-regulator.txt       |   5 +
 drivers/regulator/max8973-regulator.c              | 140 ++++++++++++++++++++-
 include/linux/regulator/max8973-regulator.h        |   4 +
 3 files changed, 147 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/max8973-regulator.txt +0 -0
index f80ea2f..93f9939 100644

Documentation/devicetree/bindings/regulator/max8973-regulator.txt Optional properties: · line 35

Quoted 5 lines
Documentation/devicetree/bindings/regulator/max8973-regulator.txt +2 -0
@@ -31,6 +31,11 @@ Optional properties:
                property is available then etr will be enable default.
 
 Enhanced transient response (ETR) will affect the configuration of CKADV.
+-maxim,junction-temp-warning: Junction temp warning on which device generates
+               warning interrupts. This is in millicelcius.

Please append units: maxim,junction-temp-warning-millicelsius or perhaps maxim,junction-warn-millicelsius to shorten it a bit.

Quoted 6 lines
Documentation/devicetree/bindings/regulator/max8973-regulator.txt +3 -0
+
+Please note that thermal functionality is only supported on MAX77621. The
+threshold warning supported by MAX77621 are 120 degC and 140 degC.
 
 Example:
 
#4 lore raw
In reply to Laxman Dewangan
Quoted 14 lines · Laxman Dewangan
Quoted 11 lines · Rob Herring

On Wed, Jan 6, 2016 at 10:07 AM, Laxman Dewangan <[email protected]> wrote:

Enhanced transient response (ETR) will affect the configuration of
CKADV.
+-maxim,junction-temp-warning: Junction temp warning on which device generates
+ warning interrupts. This is in millicelcius.
Please append units: maxim,junction-temp-warning-millicelsius or perhaps maxim,junction-warn-millicelsius to shorten it a bit.

Quoted 4 lines

This is very generic which is there on most of PMIC devices from Maxim, TI etc.
So can we make it generic i.e. do not prefix with vendor name like "junction-warn-millicelsius"?

I've got no problem with that.

Rob