From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: rui.zhang@intel.com, edubezval@gmail.com, rafael.j.wysocki@intel.com
Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH 4/4] Thermal/int340x/int3403: Support for thermistor and IR sensor
Date: Wed, 28 Jan 2015 11:56:49 -0800 [thread overview]
Message-ID: <1422475009-20759-4-git-send-email-srinivas.pandruvada@linux.intel.com> (raw)
In-Reply-To: <1422475009-20759-1-git-send-email-srinivas.pandruvada@linux.intel.com>
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 --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:
--
1.9.3
next prev parent reply other threads:[~2015-01-28 20:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 19:56 [PATCH 1/4] ACPI / LPAT: Common table processing functions Srinivas Pandruvada
2015-01-28 19:56 ` [PATCH 2/4] ACPI / PMIC: Use common LPAT table handling functions Srinivas Pandruvada
2015-01-28 19:56 ` [PATCH 3/4] Thermal/int340x: LPAT conversion for temperature Srinivas Pandruvada
2015-01-28 19:56 ` Srinivas Pandruvada [this message]
2015-01-29 17:38 ` [PATCH 1/4] ACPI / LPAT: Common table processing functions Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422475009-20759-4-git-send-email-srinivas.pandruvada@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=edubezval@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).