diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-06-13 20:35:23 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-06-14 16:16:23 -0700 |
commit | 7402388c587e03181559f859f797f27c840c32ab (patch) | |
tree | 24c3652102379847d81aefd5d9dc5b34d0486ec9 | |
parent | 981208dbcf31067ba85519ec9e8ec22d19ceed4d (diff) | |
download | chrome-ec-7402388c587e03181559f859f797f27c840c32ab.tar.gz |
Move i2c_old_response flag to i2c interface module
It's not used by the host command module or handlers, so shouldn't be exposed to them.
BUG=chrome-os-partner:20185
BRANCH=none
TEST='ectool hello' still works
Change-Id: I0122bd9ef33e71afab7e5cc035fb3b9d220334c6
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58632
Reviewed-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | chip/stm32/i2c-stm32f100.c | 7 | ||||
-rw-r--r-- | include/host_command.h | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chip/stm32/i2c-stm32f100.c b/chip/stm32/i2c-stm32f100.c index 7952d4a5f5..6803f1fa33 100644 --- a/chip/stm32/i2c-stm32f100.c +++ b/chip/stm32/i2c-stm32f100.c @@ -98,6 +98,7 @@ static uint16_t i2c_sr1[I2C_PORT_COUNT]; /* Buffer for host commands (including version, error code and checksum) */ static uint8_t host_buffer[EC_HOST_PARAM_SIZE + 4]; static struct host_cmd_handler_args host_cmd_args; +static uint8_t i2c_old_response; /* Send an old-style response */ /* Flag indicating if a command is currently in the buffer */ static uint8_t rx_pending; @@ -175,7 +176,7 @@ static void i2c_send_response(struct host_cmd_handler_args *args) int sum = 0, i; *out++ = args->result; - if (!args->i2c_old_response) { + if (!i2c_old_response) { *out++ = size; sum = args->result + size; } @@ -213,13 +214,13 @@ static void i2c_process_command(void) args->result = EC_RES_INVALID_CHECKSUM; buff += 3; - args->i2c_old_response = 0; + i2c_old_response = 0; } else { /* Old style command */ args->version = 0; args->params_size = EC_HOST_PARAM_SIZE; /* unknown */ buff++; - args->i2c_old_response = 1; + i2c_old_response = 1; } /* we have an available command : execute it */ diff --git a/include/host_command.h b/include/host_command.h index 9681be7b1a..cc14d672af 100644 --- a/include/host_command.h +++ b/include/host_command.h @@ -22,7 +22,6 @@ struct host_cmd_handler_args { uint8_t command; /* Command (e.g., EC_CMD_FLASH_GET_INFO) */ uint8_t version; /* Version of command (0-31) */ uint8_t params_size; /* Size of input parameters in bytes */ - uint8_t i2c_old_response; /* (for I2C) send an old-style response */ const void *params; /* Input parameters */ /* * Pointer to output response data buffer. On input to the handler, |