diff mbox

[4/4] Thermal/int340x/int3403: Support for thermistor and IR sensor

Message ID 1422475009-20759-4-git-send-email-srinivas.pandruvada@linux.intel.com (mailing list archive)
State Accepted, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Srinivas Pandruvada Jan. 28, 2015, 7:56 p.m. UTC
Added two more sensor types: Thermistor and IR sensor. Each of these
sensors have unique ptyp value.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/thermal/int340x_thermal/int3403_thermal.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox

Patch

diff --git a/drivers/thermal/int340x_thermal/int3403_thermal.c b/drivers/thermal/int340x_thermal/int3403_thermal.c
index 50a7a08..2b5b140 100644
--- a/drivers/thermal/int340x_thermal/int3403_thermal.c
+++ b/drivers/thermal/int340x_thermal/int3403_thermal.c
@@ -24,6 +24,9 @@ 
 #define INT3403_TYPE_SENSOR		0x03
 #define INT3403_TYPE_CHARGER		0x0B
 #define INT3403_TYPE_BATTERY		0x0C
+#define INT3403_TYPE_SENSOR_THERMISTOR	0x12
+#define INT3403_TYPE_SENSOR_IR		0x13
+
 #define INT3403_PERF_CHANGED_EVENT	0x80
 #define INT3403_THERMAL_EVENT		0x90
 
@@ -238,6 +241,8 @@  static int int3403_add(struct platform_device *pdev)
 	platform_set_drvdata(pdev, priv);
 	switch (priv->type) {
 	case INT3403_TYPE_SENSOR:
+	case INT3403_TYPE_SENSOR_THERMISTOR:
+	case INT3403_TYPE_SENSOR_IR:
 		result = int3403_sensor_add(priv);
 		break;
 	case INT3403_TYPE_CHARGER:
@@ -262,6 +267,8 @@  static int int3403_remove(struct platform_device *pdev)
 
 	switch (priv->type) {
 	case INT3403_TYPE_SENSOR:
+	case INT3403_TYPE_SENSOR_THERMISTOR:
+	case INT3403_TYPE_SENSOR_IR:
 		int3403_sensor_remove(priv);
 		break;
 	case INT3403_TYPE_CHARGER: