diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-07-16 15:10:11 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-20 23:09:18 +0000 |
commit | 473bd883b60fd5b00377766dae2bacad246de0d2 (patch) | |
tree | 992d9f03104277934c22c869eceb634e2cf5f7ec /driver/accelgyro_bmi160.h | |
parent | 053491b560d2c4e374bb739373d8ae25c41f6315 (diff) | |
download | chrome-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 'driver/accelgyro_bmi160.h')
-rw-r--r-- | driver/accelgyro_bmi160.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/driver/accelgyro_bmi160.h b/driver/accelgyro_bmi160.h index 4f9cc61b84..a5a152f471 100644 --- a/driver/accelgyro_bmi160.h +++ b/driver/accelgyro_bmi160.h @@ -13,19 +13,16 @@ /* * The addr field of motion_sensor support both SPI and I2C: - * - * +-------------------------------+---+ - * | 7 bit i2c address | 0 | - * +-------------------------------+---+ - * Or - * +-------------------------------+---+ - * | SPI device ID | 1 | - * +-------------------------------+---+ + * This is defined in include/i2c.h and is no longer an 8bit + * address. The 7/10 bit address starts at bit 0 and leaves + * room for a 10 bit address, although we don't currently + * have any 10 bit slaves. I2C or SPI is indicated by a + * more significant bit */ /* I2C addresses */ -#define BMI160_ADDR0__7bf 0x68 -#define BMI160_ADDR1__7bf 0x69 +#define BMI160_ADDR0_FLAGS 0x68 +#define BMI160_ADDR1_FLAGS 0x69 #define BMI160_CHIP_ID 0x00 #define BMI160_CHIP_ID_MAJOR 0xd1 @@ -486,9 +483,9 @@ void bmi160_interrupt(enum gpio_signal signal); #ifdef CONFIG_BMI160_SEC_I2C /* Functions to access the secondary device through the accel/gyro. */ -int bmi160_sec_raw_read8__7bf(const int port, const uint16_t addr__7bf, +int bmi160_sec_raw_read8(const int port, const uint16_t addr_flags, const uint8_t reg, int *data_ptr); -int bmi160_sec_raw_write8__7bf(const int port, const uint16_t addr__7bf, +int bmi160_sec_raw_write8(const int port, const uint16_t addr_flags, const uint8_t reg, int data); #endif |