diff options
author | Koro Chen <koro.chen@mediatek.com> | 2016-03-07 21:53:14 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-20 01:40:00 -0700 |
commit | f00d4621a480f12293214f14716ac33a90281ce7 (patch) | |
tree | 7ca0a72d7cf3b0ea93371b70a603d3b24edf4be4 /board | |
parent | ee5d09823f3f26ab5d31a32c96d550bb28ace808 (diff) | |
download | chrome-ec-f00d4621a480f12293214f14716ac33a90281ce7.tar.gz |
elm: kionix: allow dynamic selection of SPI or I2C transport
This CL ports c9832e04f1528 to Kionix accel driver. And also enables SPI
access of Elm's base kx022.
BUG=none
BRANCH=none
TEST=manual
Change-Id: I0c1de028c82fc62a124bb5b930a3882c4b368d71
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/331851
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/elm/board.c | 2 | ||||
-rw-r--r-- | board/elm/gpio.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/board/elm/board.c b/board/elm/board.c index ee2d6275c0..d772d7e372 100644 --- a/board/elm/board.c +++ b/board/elm/board.c @@ -106,7 +106,7 @@ const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); /* SPI devices */ const struct spi_device_t spi_devices[] = { - { CONFIG_SPI_ACCEL_PORT, 1, GPIO_SPI2_NSS } + { CONFIG_SPI_ACCEL_PORT, 2, GPIO_SPI2_NSS } }; const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices); diff --git a/board/elm/gpio.inc b/board/elm/gpio.inc index 3c23b59ea2..0488d5f405 100644 --- a/board/elm/gpio.inc +++ b/board/elm/gpio.inc @@ -99,7 +99,7 @@ GPIO(I2C1_SCL, PIN(B, 13), GPIO_INPUT) /* PD I2C */ GPIO(I2C1_SDA, PIN(B, 14), GPIO_INPUT) /* SPI MASTER. For SPI sensor */ -GPIO(SPI2_NSS, PIN(D, 0), GPIO_OUT_LOW) +GPIO(SPI2_NSS, PIN(D, 0), GPIO_OUT_HIGH) ALTERNATE(PIN_MASK(A, 0x0600), 1, MODULE_UART, 0) /* USART1: PA9/PA10 */ ALTERNATE(PIN_MASK(B, 0x00c0), 1, MODULE_I2C, 0) /* I2C MASTER:PB6/7 */ |