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 /chip | |
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>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/i2c-stm32f100.c | 7 |
1 files changed, 4 insertions, 3 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 */ |