diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2015-06-12 17:26:49 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-17 00:07:53 +0000 |
commit | 0450571a46724c702363d2706142121f9b61e212 (patch) | |
tree | 04f9931b475c200bb337075d9f8b3c537d53f66b /board/strago/board.c | |
parent | 53a2bbace35a1c55f595b9f052b627a7339c74c5 (diff) | |
download | chrome-ec-0450571a46724c702363d2706142121f9b61e212.tar.gz |
strago: Initial support for BCRD2
Following features are enabled.
1. Initialise the ADC ports to avoid floating state due to thermistors.
2. Enable the daughter board volume buttons.
3. Enable the PMIC control support.
BUG=none
TEST=Device boots to UI.
BRANCH=none
Change-Id: I27907cb79e165ce6c3df9249a35904aa12717c95
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/284110
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/strago/board.c')
-rw-r--r-- | board/strago/board.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/board/strago/board.c b/board/strago/board.c index 8dd5c0e1d9..42ec939e28 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -4,7 +4,9 @@ */ /* Strago board-specific configuration */ +#include "adc.h" #include "als.h" +#include "button.h" #include "charger.h" #include "charge_state.h" #include "driver/accel_kxcj9.h" @@ -104,6 +106,14 @@ struct ec_thermal_config thermal_params[] = { }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); +const struct button_config buttons[] = { + {"Volume Down", KEYBOARD_BUTTON_VOLUME_DOWN, GPIO_VOLUME_DOWN, + 30 * MSEC, 0}, + {"Volume Up", KEYBOARD_BUTTON_VOLUME_UP, GPIO_VOLUME_UP, + 30 * MSEC, 0}, +}; +BUILD_ASSERT(ARRAY_SIZE(buttons) == CONFIG_BUTTON_COUNT); + /* Four Motion sensors */ /* kxcj9 mutex and local/private data*/ static struct mutex g_kxcj9_mutex[2]; @@ -195,3 +205,11 @@ static void motion_sensors_pre_init(void) } DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, motion_sensors_pre_init, MOTION_SENSE_HOOK_PRIO - 1); + +/* init ADC ports to avoid floating state due to thermistors */ +static void adc_pre_init(void) +{ + /* Configure GPIOs */ + gpio_config_module(MODULE_ADC, 1); +} +DECLARE_HOOK(HOOK_INIT, adc_pre_init, HOOK_PRIO_INIT_ADC - 1); |