summaryrefslogtreecommitdiff
path: root/chip/g/i2cm.c
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2019-07-16 15:10:11 -0600
committerCommit Bot <commit-bot@chromium.org>2019-07-20 23:09:18 +0000
commit473bd883b60fd5b00377766dae2bacad246de0d2 (patch)
tree992d9f03104277934c22c869eceb634e2cf5f7ec /chip/g/i2cm.c
parent053491b560d2c4e374bb739373d8ae25c41f6315 (diff)
downloadchrome-ec-473bd883b60fd5b00377766dae2bacad246de0d2.tar.gz
Remove __7b, __8b and __7bf
The extentions were added to make the compiler perform most of the verification that the conversion was being done correctly to remove 8bit addressing as the standard I2C/SPI address type. Now that the compiler has verified the code, the extra extentions are being removed BUG=chromium:971296 BRANCH=none TEST=make buildall -j TEST=verify sensor functionality on arcada_ish Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/g/i2cm.c')
-rw-r--r--chip/g/i2cm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/chip/g/i2cm.c b/chip/g/i2cm.c
index a7b8f9ad7e..9deed8e66d 100644
--- a/chip/g/i2cm.c
+++ b/chip/g/i2cm.c
@@ -247,7 +247,7 @@ static int i2cm_poll_for_complete(int port)
return EC_ERROR_TIMEOUT;
}
-static uint32_t i2cm_create_inst__7bf(int slave_addr__7bf, int is_write,
+static uint32_t i2cm_create_inst(int slave_addr_flags, int is_write,
size_t size, uint32_t flags)
{
uint32_t inst = 0;
@@ -258,7 +258,7 @@ static uint32_t i2cm_create_inst__7bf(int slave_addr__7bf, int is_write,
* to be included.
*/
inst |= INST_START;
- inst |= INST_DEVADDRVAL(I2C_GET_ADDR__7b(slave_addr__7bf));
+ inst |= INST_DEVADDRVAL(I2C_GET_ADDR(slave_addr_flags));
inst |= INST_RWDEVADDR;
}
@@ -276,7 +276,7 @@ static uint32_t i2cm_create_inst__7bf(int slave_addr__7bf, int is_write,
return inst;
}
-static int i2cm_execute_sequence__7bf(int port, int slave_addr__7bf,
+static int i2cm_execute_sequence(int port, int slave_addr_flags,
const uint8_t *out, int out_size,
uint8_t *in, int in_size,
int flags)
@@ -309,7 +309,7 @@ static int i2cm_execute_sequence__7bf(int port, int slave_addr__7bf,
seq_flags &= ~I2C_XFER_STOP;
/* Build sequence instruction */
- inst = i2cm_create_inst__7bf(slave_addr__7bf, is_write,
+ inst = i2cm_create_inst(slave_addr_flags, is_write,
batch_size, seq_flags);
/* If this is a write - copy data into the FIFO. */
@@ -353,7 +353,7 @@ static int i2cm_execute_sequence__7bf(int port, int slave_addr__7bf,
/* Perform an i2c transaction. */
-int chip_i2c_xfer__7bf(const int port, const uint16_t slave_addr__7bf,
+int chip_i2c_xfer(const int port, const uint16_t slave_addr_flags,
const uint8_t *out, int out_size,
uint8_t *in, int in_size, int flags)
{
@@ -376,14 +376,14 @@ int chip_i2c_xfer__7bf(const int port, const uint16_t slave_addr__7bf,
if (out_size) {
/* Process write before read. */
- rv = i2cm_execute_sequence__7bf(port, slave_addr__7bf, out,
+ rv = i2cm_execute_sequence(port, slave_addr_flags, out,
out_size, NULL, 0, flags);
if (rv != EC_SUCCESS)
return rv;
}
if (in_size)
- rv = i2cm_execute_sequence__7bf(port, slave_addr__7bf,
+ rv = i2cm_execute_sequence(port, slave_addr_flags,
NULL, 0, in, in_size, flags);
return rv;