summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-01-06 08:50:24 -0800
committerCommit Bot <commit-bot@chromium.org>2021-01-08 00:24:12 +0000
commita1b83207fbbeb97471cb234576af59287a5d88ed (patch)
tree395333c47a5d43973e08a3488550de1d8ec1d0cf /include
parent22088bd1a47ed7f09f35e5b4dd1efdc45b5855a3 (diff)
downloadchrome-ec-a1b83207fbbeb97471cb234576af59287a5d88ed.tar.gz
coil: cleanup i2c comments
Remove coil terms from i2c comments BUG=b:175244613 TEST=make buildall -j Change-Id: If056c099304e1fa676991e22ddaa9cb91ccfdeb3 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613509 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h14
-rw-r--r--include/ec_commands.h4
-rw-r--r--include/i2c.h85
-rw-r--r--include/usb_i2c.h6
-rw-r--r--include/usb_mux.h2
5 files changed, 61 insertions, 50 deletions
diff --git a/include/config.h b/include/config.h
index acb2cc340f..259d533008 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2162,10 +2162,10 @@
*/
#undef CONFIG_I2C_CONTROLLER
-/* EC uses an I2C slave interface */
+/* EC uses an I2C peripheral interface */
#undef CONFIG_I2C_PERIPH
-/* Defines I2C operation retry count when slave nack'd(EC_ERROR_BUSY) */
+/* Defines I2C operation retry count when peripheral nack'd(EC_ERROR_BUSY) */
#define CONFIG_I2C_NACK_RETRY_COUNT 0
/*
* I2C SCL gating.
@@ -2179,10 +2179,10 @@
#undef CONFIG_I2C_SCL_GATE_GPIO
/*
- * Some chip supports two owned slave address. The second slave address is used
- * for other purpose such as board specific i2c commands. This option can be
- * set if user of the second slave address requires larger host packet buffer
- * size.
+ * Some chip supports two owned peripheral address. The second peripheral
+ * address is used for other purpose such as board specific i2c commands. This
+ * option can be set if user of the second peripheral address requires larger
+ * host packet buffer size.
*/
#define CONFIG_I2C_EXTRA_PACKET_SIZE 0
@@ -2203,7 +2203,7 @@
* i2c_read_string and i2c_write_block. Where
* - write operation appends an error checking byte at end of transfer, and
* - read operatoin verifies the correctness of error checking byte from the
- * slave.
+ * peripheral.
* Set I2C_FLAG on addr_flags parameter to use this feature.
*
* This option also enables error checking function on smart batteries.
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 64b77d3e3b..2cdb4df192 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -4121,7 +4121,7 @@ struct ec_response_power_info_v1 {
#define EC_I2C_STATUS_ERROR (EC_I2C_STATUS_NAK | EC_I2C_STATUS_TIMEOUT)
struct ec_params_i2c_passthru_msg {
- uint16_t addr_flags; /* I2C slave address and flags */
+ uint16_t addr_flags; /* I2C periph address and flags */
uint16_t len; /* Number of bytes to read or write */
} __ec_align2;
@@ -5843,7 +5843,7 @@ struct ec_response_battery_dynamic_info {
} __ec_align2;
/*
- * Control charger chip. Used to control charger chip on the slave.
+ * Control charger chip. Used to control charger chip on the periph.
*/
#define EC_CMD_CHARGER_CONTROL 0x0602
diff --git a/include/i2c.h b/include/i2c.h
index cf5729f91b..e61e0a6375 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* I2C interface for Chrome EC */
+/* I2C driver for Chrome EC */
#ifndef __CROS_EC_I2C_H
#define __CROS_EC_I2C_H
@@ -14,7 +14,7 @@
#include "stddef.h"
/*
- * I2C Slave Address encoding
+ * I2C Peripheral Address encoding
*
* EC will favor 7bit I2C/SPI address encoding. The variable/define
* naming should follow the pattern, if it is just the 7 bit address
@@ -29,7 +29,7 @@
* clear. I suggest, since this is a very small amount of usage, that
* ending the variable as "addr_8bit" would make this clear.
*
- * NOTE: Slave addresses are always 16 bit values. The least significant
+ * NOTE: Peripheral addresses are always 16 bit values. The least significant
* 10 bits are available as an address. More significant bits are
* used here and in motion_sense to give specific meaning to the
* address that is pertinent to its use.
@@ -148,7 +148,7 @@ extern const int i2c_test_dev_used;
* by locking the I2C port and performing an I2C_XFER_SINGLE transfer.
*
* @param port Port to access
- * @param periph_addr Slave device address
+ * @param periph_addr peripheral device address
* @param out Data to send
* @param out_size Number of bytes to send
* @param in Destination buffer for received data
@@ -183,7 +183,7 @@ int i2c_xfer_unlocked(const int port,
* i2c_xfer().
*
* @param port Port to access
- * @param periph_addr Slave device address
+ * @param periph_addr peripheral device address
* @param out Data to send
* @param out_size Number of bytes to send
* @param in Destination buffer for received data
@@ -287,80 +287,90 @@ void i2c_prepare_sysjump(void);
void i2c_set_timeout(int port, uint32_t timeout);
/**
- * Read a 32-bit register from the slave at 7-bit slave address <periphaddr>, at
- * the specified 8-bit <offset> in the slave's address space.
+ * Read a 32-bit register from the peripheral at 7-bit peripheral address
+ * <periphaddr>, at the specified 8-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_read32(const int port,
const uint16_t periph_addr_flags,
int offset, int *data);
/**
- * Write a 32-bit register to the slave at 7-bit slave address <periphaddr>, at
- * the specified 8-bit <offset> in the slave's address space.
+ * Write a 32-bit register to the peripheral at 7-bit peripheral address
+ * <periphaddr>, at the specified 8-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_write32(const int port,
const uint16_t periph_addr_flags,
int offset, int data);
/**
- * Read a 16-bit register from the slave at 7-bit slave address <periphaddr>, at
- * the specified 8-bit <offset> in the slave's address space.
+ * Read a 16-bit register from the peripheral at 7-bit peripheral address
+ * <periphaddr>, at the specified 8-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_read16(const int port,
const uint16_t periph_addr_flags,
int offset, int *data);
/**
- * Write a 16-bit register to the slave at 7-bit slave address <periphaddr>, at
- * the specified 8-bit <offset> in the slave's address space.
+ * Write a 16-bit register to the peripheral at 7-bit peripheral address
+ * <periphaddr>, at the specified 8-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_write16(const int port,
const uint16_t periph_addr_flags,
int offset, int data);
/**
- * Read an 8-bit register from the slave at 7-bit slave address <periphaddr>, at
- * the specified 8-bit <offset> in the slave's address space.
+ * Read an 8-bit register from the peripheral at 7-bit peripheral address
+ * <periphaddr>, at the specified 8-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_read8(const int port,
const uint16_t periph_addr_flags,
int offset, int *data);
/**
- * Write an 8-bit register to the slave at 7-bit slave address <periphaddr>, at
- * the specified 8-bit <offset> in the slave's address space.
+ * Write an 8-bit register to the peripheral at 7-bit peripheral address
+ * <periphaddr>, at the specified 8-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_write8(const int port,
const uint16_t periph_addr_flags,
int offset, int data);
/**
- * Read one or two bytes data from the slave at 7-bit slave address
- * * <periphaddr>, at 16-bit <offset> in the slave's address space.
+ * Read one or two bytes data from the peripheral at 7-bit peripheral address
+ * <periphaddr>, at 16-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_read_offset16(const int port,
const uint16_t periph_addr_flags,
uint16_t offset, int *data, int len);
/**
- * Write one or two bytes data to the slave at 7-bit slave address
- * <periphaddr>, at 16-bit <offset> in the slave's address space.
+ * Write one or two bytes data to the peripheral at 7-bit peripheral address
+ * <periphaddr>, at 16-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_write_offset16(const int port,
const uint16_t periph_addr_flags,
uint16_t offset, int data, int len);
/**
- * Read <len> bytes block data from the slave at 7-bit slave address
- * * <periphaddr>, at 16-bit <offset> in the slave's address space.
+ * Read <len> bytes block data from the peripheral at 7-bit peripheral address
+ * <periphaddr>, at 16-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_read_offset16_block(const int port,
const uint16_t periph_addr_flags,
uint16_t offset, uint8_t *data, int len);
/**
- * Write <len> bytes block data to the slave at 7-bit slave address
- * <periphaddr>, at 16-bit <offset> in the slave's address space.
+ * Write <len> bytes block data to the peripheral at 7-bit peripheral address
+ * <periphaddr>, at 16-bit <offset> in the peripheral's address
+ * space.
*/
int i2c_write_offset16_block(const int port,
const uint16_t periph_addr_flags,
@@ -396,18 +406,18 @@ int i2c_read_string(const int port,
int offset, uint8_t *data, int len);
/**
- * Read a data block of <len> 8-bit transfers from the slave at 7-bit slave
- * address <periphaddr>, at the specified 8-bit <offset> in the slave's address
- * space.
+ * Read a data block of <len> 8-bit transfers from the peripheral at 7-bit
+ * peripheral address <periphaddr>, at the specified 8-bit <offset> in the
+ * peripheral's address space.
*/
int i2c_read_block(const int port,
const uint16_t periph_addr_flags,
int offset, uint8_t *data, int len);
/**
- * Write a data block of <len> 8-bit transfers to the slave at 7-bit slave
- * address <periphaddr>, at the specified 8-bit <offset> in the slave's address
- * space.
+ * Write a data block of <len> 8-bit transfers to the peripheral at 7-bit
+ * peripheral address <periphaddr>, at the specified 8-bit <offset> in the
+ * peripheral's address space.
*/
int i2c_write_block(const int port,
const uint16_t periph_addr_flags,
@@ -435,11 +445,12 @@ enum ec_status i2c_get_protocol_info(struct host_cmd_handler_args *args);
/**
* Callbacks processing received data and response
*
- * i2c_data_recived will be called when a slave finishes receiving data and
- * i2c_set_response will be called when a slave is expected to send response.
+ * i2c_data_recived will be called when a peripheral finishes receiving data and
+ * i2c_set_response will be called when a peripheral is expected to send
+ * response.
*
* Using these, Chrome OS host command protocol should be separated from
- * i2c slave drivers (e.g. i2c-stm32f0.c, i2c-stm32f3.c).
+ * i2c peripheral drivers (e.g. i2c-stm32f0.c, i2c-stm32f3.c).
*
* @param port: I2C port number
* @param buf: Buffer containing received data on call and response on return
@@ -487,7 +498,7 @@ int board_is_i2c_port_powered(int port);
* CONFIG_I2C_XFER_BOARD_CALLBACK.
*
* @param port: I2C port number
- * @param periph_addr: Slave device address
+ * @param periph_addr: peripheral device address
*
*/
void i2c_start_xfer_notify(const int port,
@@ -499,7 +510,7 @@ void i2c_start_xfer_notify(const int port,
* CONFIG_I2C_XFER_BOARD_CALLBACK.
*
* @param port: I2C port number
- * @param periph_addr: Slave device address
+ * @param periph_addr: peripheral device address
*
*/
void i2c_end_xfer_notify(const int port,
@@ -510,7 +521,7 @@ void i2c_end_xfer_notify(const int port,
* funcionality of transactions.
*
* @param port: I2C port number
- * @param periph_addr: slave device address
+ * @param periph_addr: peripheral device address
* @param direction: 0 for write,
* 1 for read
* @param data: pointer to data read or written
diff --git a/include/usb_i2c.h b/include/usb_i2c.h
index 5719ee4333..d5ea414e3b 100644
--- a/include/usb_i2c.h
+++ b/include/usb_i2c.h
@@ -50,10 +50,10 @@
* Fields:
*
* - wc/port: 1 byte: 4 top bits are the 4 top bits of the 12 bit write
- * counter, the 4 bottom bits are the port address, i2c interface
+ * counter, the 4 bottom bits are the port address, i2c driver
* index.
*
- * - addr: slave address, 1 byte, i2c 7-bit bus address.
+ * - addr: peripheral address, 1 byte, i2c 7-bit bus address.
*
* - wc: write count, 1 byte, zero based count of bytes to write. If the
* indicated write count cause the payload + header exceeds 64 bytes,
@@ -216,7 +216,7 @@ int usb_i2c_board_is_enabled(void);
/*
* Special i2c address to use when the client is required to execute some
- * command which does not directly involve the i2c master driver.
+ * command which does not directly involve the i2c controller driver.
*/
#define USB_I2C_CMD_ADDR_FLAGS 0x78
diff --git a/include/usb_mux.h b/include/usb_mux.h
index c628cfc869..ad683e5920 100644
--- a/include/usb_mux.h
+++ b/include/usb_mux.h
@@ -184,7 +184,7 @@ struct usb_retimer {
* no retimer driver is to be called.
*/
- /* I2C port and slave address */
+ /* I2C port and peripheral address */
const int i2c_port;
const uint16_t i2c_addr_flags;