From: Mika Westerberg Date: Mon, 5 Mar 2012 23:01:04 +0000 (-0800) Subject: x86/mid/thermal: Turn off thermistor X-Git-Tag: firefly_0821_release~3680^2~3310^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b7ccabcc372152d1492241610e52b8ea14b0968;p=firefly-linux-kernel-4.4.55.git x86/mid/thermal: Turn off thermistor 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 Signed-off-by: Kirill A. Shutemov Signed-off-by: Alan Cox Acked-by: Durgadoss R Acked-by: H. Peter Anvin Cc: Matthew Garrett Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/n/tip-85zdo06yve1o27jpwc74gzng@git.kernel.org Signed-off-by: Ingo Molnar --- diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c index 5917b3c83728..2ee9766737ea 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();