diff options
author | Diana Z <dzigterman@chromium.org> | 2021-06-07 16:10:42 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-09 17:44:19 +0000 |
commit | 7837e2011cf7c4d8690a17f9b7d89768a5a01d4c (patch) | |
tree | 48758199beccadd5b67e5a6f7b749e62c8a4e881 /include/motion_sense.h | |
parent | 5927d4ccc51a131e075c1aad44532caa2faa7ef0 (diff) | |
download | chrome-ec-7837e2011cf7c4d8690a17f9b7d89768a5a01d4c.tar.gz |
COIL: Rename motion sense address macros
Update the motion_sense.h address macros to reflect our current i2c
terms, and also to specify that these are used exclusively in the
accelerometer code.
BRANCH=None
BUG=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ibad287df2ba1ecd0b6f3061599476636ac7a5354
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2946316
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r-- | include/motion_sense.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index 29ac220395..e507a3c799 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -78,22 +78,22 @@ enum sensor_config { #define BASE_RANGE(_range) ((_range) & ~ROUND_UP_FLAG) /* - * I2C/SPI Slave Address encoding for motion sensors + * I2C/SPI Address flags encoding for motion sensors * - The generic defines, I2C_ADDR_MASK and I2C_IS_BIG_ENDIAN_MASK * are defined in i2c.h. * - Motion sensors support some sensors on the SPI bus, so this * overloads the I2C Address to use a single bit to indicate * it is a SPI address instead of an I2C. Since SPI does not - * use slave addressing, it is up to the driver to use this + * use peripheral addressing, it is up to the driver to use this * field as it sees fit */ -#define SLAVE_MK_I2C_ADDR_FLAGS(addr) (addr) -#define SLAVE_MK_SPI_ADDR_FLAGS(addr) ((addr) | I2C_FLAG_ADDR_IS_SPI) +#define ACCEL_MK_I2C_ADDR_FLAGS(addr) (addr) +#define ACCEL_MK_SPI_ADDR_FLAGS(addr) ((addr) | I2C_FLAG_ADDR_IS_SPI) -#define SLAVE_GET_I2C_ADDR(addr_flags) (I2C_STRIP_FLAGS(addr_flags)) -#define SLAVE_GET_SPI_ADDR(addr_flags) ((addr_flags) & I2C_ADDR_MASK) +#define ACCEL_GET_I2C_ADDR(addr_flags) (I2C_STRIP_FLAGS(addr_flags)) +#define ACCEL_GET_SPI_ADDR(addr_flags) ((addr_flags) & I2C_ADDR_MASK) -#define SLAVE_IS_SPI(addr_flags) ((addr_flags) & I2C_FLAG_ADDR_IS_SPI) +#define ACCEL_ADDR_IS_SPI(addr_flags) ((addr_flags) & I2C_FLAG_ADDR_IS_SPI) /* * Define the frequency to use in max_frequency based on the maximal frequency @@ -171,7 +171,7 @@ struct motion_sensor_t { /* i2c port */ uint8_t port; - /* i2c address or SPI slave logic GPIO. */ + /* i2c address or SPI port */ uint16_t i2c_spi_addr_flags; /* |