diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-09-23 11:06:04 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-23 15:58:45 -0700 |
commit | bcb5fb2320658b8435d94ea87b740cac8d94b265 (patch) | |
tree | 29723aa70861c8f0dde4f263df7103f971f86774 | |
parent | 6a11d9ae705d911ba79b4d909000243a29db1233 (diff) | |
download | chrome-ec-bcb5fb2320658b8435d94ea87b740cac8d94b265.tar.gz |
board: ryu: Use CONFIG_SPI_ACCEL_PORT instead of numerical
spi_devices array needs the SPI master port used.
It is defined as CONFIG_, use it.
BUG=none
BRANCH=smaug
TEST=Check the sensors still work.
Change-Id: I6ce978caa32f4135dced59417a81ae280777fe57
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/302021
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | board/ryu/board.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/board/ryu/board.c b/board/ryu/board.c index 6673296c31..487bc75c22 100644 --- a/board/ryu/board.c +++ b/board/ryu/board.c @@ -168,7 +168,8 @@ static void board_init(void) if (board_has_spi_sensors()) { for (i = MOTIONSENSE_TYPE_ACCEL; i <= MOTIONSENSE_TYPE_MAG; i++) { - motion_sensors[i].addr = BMI160_SET_SPI_ADDRESS(1); + motion_sensors[i].addr = + BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT); } /* SPI sensors: put back the GPIO in its expected state */ gpio_set_level(GPIO_SPI3_NSS, 1); |