GLKRVP: Enable Volume buttons

BUG=b:65461918
BRANCH=glkrvp
TEST=Volume button notification can scroll in the UI.

Change-Id: I9229e0fd0613bd672eff22e4cc087ad447d8d795
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/656530
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Vijay Hiremath
2017-09-07 16:35:55 -07:00
committed by chrome-bot
parent 6010e6c98e
commit 1623f192e8
3 changed files with 22 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
/* Intel GLK-RVP board-specific configuration */
#include "button.h"
#include "chipset.h"
#include "console.h"
#include "extpower.h"
@@ -71,6 +72,24 @@ const enum gpio_signal hibernate_wake_pins[] = {
};
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
const struct button_config buttons[CONFIG_BUTTON_COUNT] = {
{
.name = "Volume Up",
.type = KEYBOARD_BUTTON_VOLUME_UP,
.gpio = GPIO_EC_VOLUP_BTN_ODL,
.debounce_us = 30 * MSEC,
.flags = 0,
},
{
.name = "Volume Down",
.type = KEYBOARD_BUTTON_VOLUME_DOWN,
.gpio = GPIO_EC_VOLDN_BTN_ODL,
.debounce_us = 30 * MSEC,
.flags = 0,
},
};
BUILD_ASSERT(ARRAY_SIZE(buttons) == CONFIG_BUTTON_COUNT);
/* Called by APL power state machine when transitioning from G3 to S5 */
static void chipset_pre_init(void)
{

View File

@@ -84,6 +84,7 @@
/* EC */
#define CONFIG_BOARD_VERSION
#define CONFIG_BOARD_SPECIFIC_VERSION
#define CONFIG_BUTTON_COUNT 2
#define CONFIG_WP_ALWAYS
#define CONFIG_I2C
#define CONFIG_I2C_MASTER

View File

@@ -22,6 +22,8 @@ GPIO_INT(AC_PRESENT, PIN(D, 2), GPIO_INT_BOTH, extpower_interrupt) /* ACOK_OD
GPIO_INT(WP_L, PIN(9, 3), GPIO_INT_BOTH | GPIO_SEL_1P8V, switch_interrupt) /* EC_WP_ODL */
GPIO_INT(USB_C0_PD_INT_ODL, PIN(6, 2), GPIO_INT_FALLING, tcpc_alert_event)
GPIO_INT(USB_C1_PD_INT_ODL, PIN(6, 3), GPIO_INT_FALLING, tcpc_alert_event)
GPIO_INT(EC_VOLUP_BTN_ODL, PIN(3, 4), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt)
GPIO_INT(EC_VOLDN_BTN_ODL, PIN(3, 7), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt)
GPIO(PCH_SMI_L, PIN(C, 6), GPIO_ODR_HIGH) /* EC_SMI_ODL */
GPIO(PCH_SCI_L, PIN(7, 6), GPIO_ODR_HIGH) /* EC_SCI_ODL */
@@ -66,9 +68,6 @@ UNIMPLEMENTED(USB_C1_5V_EN)
GPIO(NC_02, PIN(0, 2), GPIO_INPUT)
GPIO(NC_04, PIN(0, 4), GPIO_INPUT)
GPIO(NC_34, PIN(3, 4), GPIO_INPUT)
GPIO(NC_37, PIN(3, 7), GPIO_INPUT)
GPIO(NC_41, PIN(4, 1), GPIO_INPUT)
GPIO(NC_42, PIN(4, 2), GPIO_INPUT)