From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: mjg@redhat.com, platform-driver-x86@vger.kernel.org
Subject: [PATCH 3/4] platform-x86: intel_mid_thermal: turn off thermistor voltage by default
Date: Thu, 15 Dec 2011 22:28:24 +0000 [thread overview]
Message-ID: <20111215222821.9670.11798.stgit@bob.linux.org.uk> (raw)
In-Reply-To: <20111215222702.9670.63670.stgit@bob.linux.org.uk>
From: Mika Westerberg <mika.westerberg@linux.intel.com>
Instead of complaining that the voltage is on, we can just ask the MSIC to
turn the voltage off. This should save some power.
Voltage for thermistors is turned on when ADC conversion is initiated.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/platform/x86/intel_mid_thermal.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index aef4979..a4e56be 100644
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@ -360,8 +360,10 @@ static int mid_initialize_adc(struct device *dev)
if (ret)
return ret;
- if (data & MSIC_ADCTHERM_MASK)
- dev_warn(dev, "ADCTHERM already set");
+ data &= ~MSIC_ADCTHERM_MASK;
+ ret = intel_msic_reg_write(INTEL_MSIC_ADC1CNTL3, data);
+ if (ret)
+ return ret;
/* Index of the first channel in which the stop bit is set */
channel_index = find_free_channel();
next prev parent reply other threads:[~2011-12-15 22:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 22:27 [PATCH 0/4] MRST/Medfield thermal updates Alan Cox
2011-12-15 22:27 ` [PATCH 1/4] platform-x86: intel_mid_thermal: add msic_thermal alias Alan Cox
2011-12-15 22:28 ` [PATCH 2/4] platform-x86: intel_mid_thermal: convert to use Intel MSIC API Alan Cox
2011-12-15 22:28 ` Alan Cox [this message]
2011-12-15 22:28 ` [PATCH 4/4] x86, mrst: add msic_thermal platform support Alan Cox
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=20111215222821.9670.11798.stgit@bob.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.