From: Mika Westerberg Date: Thu, 15 Dec 2011 22:28:24 +0000 (+0000) Subject: platform-x86: intel_mid_thermal: turn off thermistor voltage by default X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0266e49b3fd37065f9f90856c75f442c020bd96e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git platform-x86: intel_mid_thermal: turn off thermistor voltage by default 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 Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c index b07f93d64a91..acd7d2d3d912 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();