summaryrefslogtreecommitdiff
path: root/board/oak/board.h
diff options
context:
space:
mode:
authorBen Lok <ben.lok@mediatek.com>2015-12-18 19:45:14 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-03-01 08:25:58 -0800
commita36a6ca96e864b2ce193df0874d84360cfce0c9e (patch)
tree98ae879250c87458fcb4ddbf1c558592e99ee7d4 /board/oak/board.h
parent7b43197449dc864c184c28c644d7b6cb62a688a1 (diff)
downloadchrome-ec-a36a6ca96e864b2ce193df0874d84360cfce0c9e.tar.gz
oak: Add kx022 lid accelerometer for rev5.
refer to commit 574c8065710432f5a91fd8dd11d1fa28e2be1f3b, adds the lid accelerometer to the list of motion sensors on the rev5. Since commit bc404c94b4ab1e6a62e607fd7ef034aa31d6388e, math_util.c is no longer to include "math.h" header file. BUG=chrome-os-partner:50312 BRANCH=none TEST=Build Oak EC with driver enabled and verify that valid accelerometer data is read, and that range, resolution, and odr can all be modified. TEST=Verified that signs of accelerometer data conform to those shown in the doc. TEST=make buildall tests Change-Id: I8df1b2331a1fbea82015b97985541e2ebc393d10 Signed-off-by: Ben Lok <ben.lok@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/319332 Commit-Ready: Rong Chang <rongchang@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'board/oak/board.h')
-rw-r--r--board/oak/board.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/board/oak/board.h b/board/oak/board.h
index 6336ba16ad..ffa6b53207 100644
--- a/board/oak/board.h
+++ b/board/oak/board.h
@@ -11,6 +11,7 @@
/* board revision */
#include "board_revs.h"
+#define CONFIG_ACCEL_KX022
#define CONFIG_ADC
#undef CONFIG_ADC_WATCHDOG
@@ -132,15 +133,16 @@
#define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C, GPIO_D
/* 2 I2C master ports, connect to battery, charger, pd and USB switches */
-#define I2C_PORT_MASTER 0
+#define I2C_PORT_MASTER 0
+#define I2C_PORT_ACCEL 0
+#define I2C_PORT_ALS 0
#define I2C_PORT_BATTERY 0
#define I2C_PORT_CHARGER 0
#define I2C_PORT_PERICOM 0
#define I2C_PORT_THERMAL 0
-#define I2C_PORT_PD_MCU 1
+#define I2C_PORT_PD_MCU 1
#define I2C_PORT_USB_MUX 1
-#define I2C_PORT_TCPC 1
-#define I2C_PORT_ALS I2C_PORT_MASTER
+#define I2C_PORT_TCPC 1
/* Ambient Light Sensor address */
#define OPT3001_I2C_ADDR OPT3001_I2C_ADDR1