Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b7ccabc authored by Mika Westerberg's avatar Mika Westerberg Committed by Ingo Molnar
Browse files

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: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Acked-by: default avatarDurgadoss R <durgadoss.r@intel.com>
Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-85zdo06yve1o27jpwc74gzng@git.kernel.org


Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 63483070
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -360,8 +360,10 @@ static int mid_initialize_adc(struct device *dev)
	if (ret)
	if (ret)
		return ret;
		return ret;


	if (data & MSIC_ADCTHERM_MASK)
	data &= ~MSIC_ADCTHERM_MASK;
		dev_warn(dev, "ADCTHERM already set");
	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 */
	/* Index of the first channel in which the stop bit is set */
	channel_index = find_free_channel();
	channel_index = find_free_channel();