summaryrefslogtreecommitdiff
path: root/include/temp_sensor.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-11 11:06:29 -0700
committerGerrit <chrome-bot@google.com>2012-10-11 14:24:36 -0700
commit22e03a1de6d525e84e511f4b25531caf6f1a93fd (patch)
tree4b060ef35e12ea2d551518489244bdf59f9a14b8 /include/temp_sensor.h
parent8f2e99da75152c428c6c92b20a13a62a5fcb40d1 (diff)
downloadchrome-ec-22e03a1de6d525e84e511f4b25531caf6f1a93fd.tar.gz
link: Temp sensors can return not-powered error code
This removes the need for a separate method to check sensor power, and gets rid of temp_sensor.c knowledge of what powers each sensor. BUG=chrome-os-partner:15174 BRANCH=link TEST=manual - reboot - within a second, type 'temps'; I2C sensors should return error 1 - type 'temps' again; all sensors should return data - power off system - type 'temps' again; I2C sensors and PECI should return error 8 - 'gpioset enable_vs 1' - type 'temps' again; I2C sensors should return valid data; PECI should still return error 8. Change-Id: I17c353b3c483bc320769307c7715008ec729089b Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/35287 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/temp_sensor.h')
-rw-r--r--include/temp_sensor.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/temp_sensor.h b/include/temp_sensor.h
index 9de57a0c71..04b7e868ff 100644
--- a/include/temp_sensor.h
+++ b/include/temp_sensor.h
@@ -11,10 +11,6 @@
#include "common.h"
#include "board.h"
-#define TEMP_SENSOR_POWER_NONE 0x0
-#define TEMP_SENSOR_POWER_VS 0x1
-#define TEMP_SENSOR_POWER_CPU 0x2
-
/* "enum temp_sensor_id" must be defined for each board in board.h. */
enum temp_sensor_id;
@@ -34,8 +30,6 @@ enum temp_sensor_type {
struct temp_sensor_t {
const char* name;
- /* Flags indicating power needed by temp sensor. */
- int8_t power_flags;
/* Temperature sensor type. */
enum temp_sensor_type type;
/* Read sensor value in K into temp_ptr; return non-zero if error. */
@@ -57,7 +51,4 @@ struct temp_sensor_t {
*/
int temp_sensor_read(enum temp_sensor_id id, int *temp_ptr);
-/* Return non-zero if sensor is powered. */
-int temp_sensor_powered(enum temp_sensor_id id);
-
#endif /* __CROS_EC_TEMP_SENSOR_H */