mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 10:31:02 +00:00
Add support for ADC / thermistor reads on the EC's ADC This will support now only ncp15wb but we can expand it at future time. BUG=chrome-os-partner:44764 TEST=make buildall -j Manual on celes with subsequent commit. Boot to S0, run "temps". Verify that temperatures are. See temperature is changing BRANCH=None Change-Id: If26d24b803dcff00c4c24e4e1f71d3b0de8e6738 Signed-off-by: Wonjoon Lee <woojoo.lee@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/296872 Reviewed-by: Shawn N <shawnn@chromium.org>
25 lines
735 B
C
25 lines
735 B
C
/* Copyright 2015 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* ec_adc which uses adc and thermistors module for Chrome EC
|
|
* Some EC has it's own ADC modules, define here EC's max ADC channels.
|
|
* We can consider every channel as a thermal sensor.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_TEMP_SENSOR_EC_ADC_H
|
|
#define __CROS_EC_TEMP_SENSOR_EC_ADC_H
|
|
|
|
/**
|
|
* Get the latest value from the sensor.
|
|
*
|
|
* @param idx ADC channel to read.
|
|
* @param temp_ptr Destination for temperature in K.
|
|
*
|
|
* @return EC_SUCCESS if successful, non-zero if error.
|
|
*/
|
|
int ec_adc_get_val(int idx, int *temp_ptr);
|
|
|
|
#endif /* __CROS_EC_TEMP_SENSOR_EC_ADC_H */
|