diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-17 15:05:04 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-23 21:27:40 +0000 |
commit | 2ad076f8a02c8a3165a76dfb093cefd79fdbfc67 (patch) | |
tree | 13f9d0505f564f07c9867aabf11b7083613666d4 /common/temp_sensor.c | |
parent | 8cf03ac0563294fbdeca2dc133d06f0b51c9a546 (diff) | |
download | chrome-ec-2ad076f8a02c8a3165a76dfb093cefd79fdbfc67.tar.gz |
cleanup: Rename and move header files
Device-specific headers belong in driver/ or chip/. The include/
directory should be for common interfaces.
Code should not normally need to include driver-specific headers. If
it does, it should use the full relative path from the EC project root
(for example, drivers/charger/bq24715.h).
Change-Id: Id23db37a431e2d802a74ec601db6f69b613352ba
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/173746
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/temp_sensor.c')
-rw-r--r-- | common/temp_sensor.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/common/temp_sensor.c b/common/temp_sensor.c index 221219bce9..9be87d9ece 100644 --- a/common/temp_sensor.c +++ b/common/temp_sensor.c @@ -5,24 +5,15 @@ /* Temperature sensor module for Chrome EC */ -#include "chip_temp_sensor.h" -#include "chipset.h" #include "common.h" #include "console.h" -#include "gpio.h" -#include "i2c.h" #include "hooks.h" #include "host_command.h" -#include "peci.h" #include "task.h" #include "temp_sensor.h" #include "timer.h" -#include "tmp006.h" #include "util.h" -/* Default temperature to report in mapped memory */ -#define MAPPED_TEMP_DEFAULT (296 - EC_TEMP_SENSOR_OFFSET) - int temp_sensor_read(enum temp_sensor_id id, int *temp_ptr) { const struct temp_sensor_t *sensor; @@ -82,10 +73,10 @@ static void temp_sensor_init(void) base_b = host_get_memmap(EC_MEMMAP_TEMP_SENSOR_B); for (i = 0; i < TEMP_SENSOR_COUNT; ++i) { if (i < EC_TEMP_SENSOR_ENTRIES) - base[i] = MAPPED_TEMP_DEFAULT; + base[i] = EC_TEMP_SENSOR_DEFAULT; else base_b[i - EC_TEMP_SENSOR_ENTRIES] = - MAPPED_TEMP_DEFAULT; + EC_TEMP_SENSOR_DEFAULT; } /* Set the rest of memory region to SENSOR_NOT_PRESENT */ |