summaryrefslogtreecommitdiff
path: root/chip/npcx/i2c.c
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2020-08-03 13:06:42 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-05 18:41:25 +0000
commitdede4e01ae4c877bb05d671087a6e85a29a0f902 (patch)
tree8aaaba7b7ce04c059ecd4df4de8a5609492065db /chip/npcx/i2c.c
parente891cd5ebbb08c9101f1802c2dfcec755718d23f (diff)
downloadchrome-ec-dede4e01ae4c877bb05d671087a6e85a29a0f902.tar.gz
ec: change usage of dummy
Google is working to change its source code to use more inclusive language. To that end, replace the term "dummy" with inclusive alternatives. BUG=b:162781382 BRANCH=None TEST=make -j buildall `grep -ir dummy *` The only results are in "private/nordic_keyboard/sdk8.0.0" which is not our code. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I6a42183d998e4db4bb61625f962867fda10722e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2335737 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'chip/npcx/i2c.c')
-rw-r--r--chip/npcx/i2c.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/chip/npcx/i2c.c b/chip/npcx/i2c.c
index 17b183bc71..b4879081e8 100644
--- a/chip/npcx/i2c.c
+++ b/chip/npcx/i2c.c
@@ -99,7 +99,7 @@ enum smb_oper_state_t {
SMB_MASTER_START,
SMB_WRITE_OPER,
SMB_READ_OPER,
- SMB_DUMMY_READ_OPER,
+ SMB_FAKE_READ_OPER,
SMB_REPEAT_START,
SMB_WRITE_SUSPEND,
SMB_READ_SUSPEND,
@@ -348,7 +348,7 @@ enum smb_error i2c_master_transaction(int controller)
} else if (p_status->oper_state == SMB_READ_SUSPEND) {
if (!IS_ENABLED(NPCX_I2C_FIFO_SUPPORT)) {
/*
- * Do dummy read if read length is 1 and I2C_XFER_STOP
+ * Do extra read if read length is 1 and I2C_XFER_STOP
* is set simultaneously.
*/
if (p_status->sz_rxbuf == 1 &&
@@ -356,13 +356,13 @@ enum smb_error i2c_master_transaction(int controller)
/*
* Since SCL is released after reading last
* byte from previous transaction, adding a
- * dummy byte for next transaction which let
+ * extra byte for next transaction which let
* ec sets NACK bit in time is necessary.
* Or i2c master cannot generate STOP
* when the last byte is ACK during receiving.
*/
p_status->sz_rxbuf++;
- p_status->oper_state = SMB_DUMMY_READ_OPER;
+ p_status->oper_state = SMB_FAKE_READ_OPER;
} else
/*
* Need to read the other bytes from
@@ -475,7 +475,7 @@ void i2c_done(int controller)
NPCX_SMBFIF_CTS(controller) =
BIT(NPCX_SMBFIF_CTS_RXF_TXE);
- /* Clear SDAST by writing dummy byte */
+ /* Clear SDAST by writing mock byte */
I2C_WRITE_BYTE(controller, 0xFF);
}
@@ -536,8 +536,8 @@ static void i2c_handle_receive(int controller)
I2C_READ_BYTE(controller, data);
CPRINTS("-R(%02x)", data);
- /* Read to buf. Skip last byte if meet SMB_DUMMY_READ_OPER */
- if (p_status->oper_state == SMB_DUMMY_READ_OPER &&
+ /* Read to buf. Skip last byte if meet SMB_FAKE_READ_OPER */
+ if (p_status->oper_state == SMB_FAKE_READ_OPER &&
p_status->idx_buf == (p_status->sz_rxbuf - 1))
p_status->idx_buf++;
else
@@ -735,7 +735,7 @@ static void i2c_handle_sda_irq(int controller)
}
/* 3 Handle master read operation (read or after a write operation) */
else if (p_status->oper_state == SMB_READ_OPER ||
- p_status->oper_state == SMB_DUMMY_READ_OPER) {
+ p_status->oper_state == SMB_FAKE_READ_OPER) {
if (IS_ENABLED(NPCX_I2C_FIFO_SUPPORT))
i2c_fifo_handle_receive(controller);
else
@@ -755,7 +755,7 @@ void i2c_master_int_handler (int controller)
CPUTS("-SP");
/* Clear BER Bit */
SET_BIT(NPCX_SMBST(controller), NPCX_SMBST_BER);
- /* Mask sure slave doesn't hold bus by dummy reading */
+ /* Make sure slave doesn't hold bus by reading */
I2C_READ_BYTE(controller, data);
/* Set error code */