summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/build.mk2
-rw-r--r--common/temp_sensor_commands.c39
-rw-r--r--include/lpc_commands.h12
-rw-r--r--include/temp_sensor_commands.h22
-rw-r--r--util/ectool.c38
5 files changed, 1 insertions, 112 deletions
diff --git a/common/build.mk b/common/build.mk
index 5449987711..e018804b63 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -21,7 +21,7 @@ common-$(CONFIG_SMART_BATTERY)+=smart_battery.o charge_state.o \
common-$(CONFIG_TASK_GAIAPOWER)+=gaia_power.o
common-$(CONFIG_TASK_HOSTCMD)+=host_command.o
common-$(CONFIG_TASK_I8042CMD)+=i8042.o keyboard.o
-common-$(CONFIG_TASK_TEMPSENSOR)+=temp_sensor.o temp_sensor_commands.o
+common-$(CONFIG_TASK_TEMPSENSOR)+=temp_sensor.o
common-$(CONFIG_TASK_THERMAL)+=thermal.o thermal_commands.o
common-$(CONFIG_TASK_X86POWER)+=x86_power.o
common-$(CONFIG_TMP006)+=tmp006.o
diff --git a/common/temp_sensor_commands.c b/common/temp_sensor_commands.c
deleted file mode 100644
index 77114aa727..0000000000
--- a/common/temp_sensor_commands.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-/* Temperature sensor module for Chrome EC */
-/* This LPC command only serves as a workaround to provide reliable temperature
- * reading method until we solve the I2C hanging issue. Remove this when
- * possible. */
-
-#include "console.h"
-#include "host_command.h"
-#include "temp_sensor.h"
-#include "temp_sensor_commands.h"
-#include "lpc_commands.h"
-#include "uart.h"
-#include "util.h"
-
-
-/*****************************************************************************/
-/* Host commands */
-
-enum lpc_status temp_sensor_command_get_readings(uint8_t *data)
-{
- struct lpc_params_temp_sensor_get_readings *p =
- (struct lpc_params_temp_sensor_get_readings *)data;
- struct lpc_response_temp_sensor_get_readings *r =
- (struct lpc_response_temp_sensor_get_readings *)data;
-
- int rv;
- rv = temp_sensor_read(p->temp_sensor_id);
- if (rv == -1)
- return EC_LPC_RESULT_ERROR;
- r->value = rv;
-
- return EC_LPC_RESULT_SUCCESS;
-}
-DECLARE_HOST_COMMAND(EC_LPC_COMMAND_TEMP_SENSOR_GET_READINGS,
- temp_sensor_command_get_readings);
diff --git a/include/lpc_commands.h b/include/lpc_commands.h
index 4ca2f44b6a..5fa58310cc 100644
--- a/include/lpc_commands.h
+++ b/include/lpc_commands.h
@@ -425,18 +425,6 @@ struct lpc_response_battery_text {
#define EC_LPC_COMMAND_BATTERY_OEM 0x64
/*****************************************************************************/
-/* Temperature sensor commands */
-
-/* Get temperature readings */
-#define EC_LPC_COMMAND_TEMP_SENSOR_GET_READINGS 0x70
-struct lpc_params_temp_sensor_get_readings {
- uint8_t temp_sensor_id;
-} __attribute__ ((packed));
-struct lpc_response_temp_sensor_get_readings {
- uint32_t value;
-} __attribute__((packed));
-
-/*****************************************************************************/
/* Host event commands */
/* Host event mask params and response structures, shared by all of the host
diff --git a/include/temp_sensor_commands.h b/include/temp_sensor_commands.h
deleted file mode 100644
index 68ecdecfc1..0000000000
--- a/include/temp_sensor_commands.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-/* Temperature sensor commands for Chrome EC */
-/* This LPC command only serves as a workaround to provide reliable temperature
- * reading method until we solve the I2C hanging issue. Remove this when
- * possible. */
-
-#ifndef __CROS_EC_TEMP_SENSOR_COMMANDS_H
-#define __CROS_EC_TEMP_SENSOR_COMMANDS_H
-
-#include "common.h"
-
-/* Initializes the module. */
-int temp_sensor_commands_init(void);
-
-/* Host command handlers. */
-enum lpc_status temp_sensor_command_get_readings(uint8_t *data);
-
-#endif /* __CROS_EC_TEMP_SENSOR_COMMANDS_H */
diff --git a/util/ectool.c b/util/ectool.c
index ed63c1668b..5e13902951 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -64,8 +64,6 @@ const char help_str[] =
" Prints EC version\n"
" temps <sensorid>\n"
" Print temperature.\n"
- " tempread <sensorid>\n"
- " Force a read of temperature sensor.\n"
" thermalget <sensor_id> <threshold_id>\n"
" Get the threshold temperature value from thermal engine.\n"
" thermalset <sensor_id> <threshold_id> <value>\n"
@@ -614,41 +612,6 @@ int cmd_temperature(int argc, char *argv[])
}
-int cmd_temperature_read(int argc, char *argv[])
-{
- struct lpc_params_temp_sensor_get_readings p;
- struct lpc_response_temp_sensor_get_readings r;
- char *e;
- int rv;
-
- if (argc != 1) {
- fprintf(stderr, "Usage: tempread <sensorid\n>");
- return -1;
- }
-
- p.temp_sensor_id = strtol(argv[0], &e, 0);
- if (e && *e) {
- fprintf(stderr, "Bad sensor ID.\n");
- return -1;
- }
-
- printf("Reading temperature...");
-
- rv = ec_command(EC_LPC_COMMAND_TEMP_SENSOR_GET_READINGS,
- &p, sizeof(p), &r, sizeof(r));
- if (rv)
- return rv;
-
- if (r.value < 0) {
- printf("Error\n");
- return -1;
- }
-
- printf("%d\n", r.value);
- return 0;
-}
-
-
int cmd_thermal_get_threshold(int argc, char *argv[])
{
struct lpc_params_thermal_get_threshold p;
@@ -1261,7 +1224,6 @@ const struct command commands[] = {
{"sertest", cmd_serial_test},
{"switches", cmd_switches},
{"temps", cmd_temperature},
- {"tempread", cmd_temperature_read},
{"thermalget", cmd_thermal_get_threshold},
{"thermalset", cmd_thermal_set_threshold},
{"usbchargemode", cmd_usb_charge_set_mode},