mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-15 17:41:25 +00:00
Nearly every board had a buttons array defined in which its contents had the standard volume buttons. This commit creates a single common buttons array that can contain the standard volume buttons and recovery buttons. If a board has volume up and down buttons, they can simply define CONFIG_VOLUME_BUTTONS and it will populate the buttons array with the standard definition. The buttons are active low and have a 30 ms debounce period. Similiarly, if a board has a dedicated recovery button, defining CONFIG_DEDICATED_RECOVERY_BUTTON will also populate the buttons array with a recovery button. BUG=chromium:783371 BRANCH=None TEST=make -j buildall. TEST=Flash a device with CONFIG_VOLUME_BUTTONS, verify pressing volume buttons still work. Change-Id: Ie5d63670ca4c6b146ec8ffb64d40ea9ce437b913 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/773794 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
/* -*- mode:c -*-
|
|
*
|
|
* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Declare symbolic names for all the GPIOs that we care about.
|
|
* Note: Those with interrupt handlers must be declared first. */
|
|
|
|
GPIO_INT(LID_OPEN, PIN(0, 0), GPIO_INT_BOTH, lid_interrupt)
|
|
GPIO_INT(POWER_BUTTON_L, PIN(0, 1), GPIO_INT_BOTH, power_button_interrupt)
|
|
GPIO_INT(AC_PRESENT, PIN(0, 2), GPIO_INT_BOTH, extpower_interrupt)
|
|
GPIO_INT(VOLUME_DOWN_L, PIN(0, 3), GPIO_INT_BOTH, button_interrupt)
|
|
GPIO_INT(VOLUME_UP_L, PIN(0, 4), GPIO_INT_BOTH, button_interrupt)
|
|
GPIO_INT(CHARGE_DONE, PIN(0, 5), GPIO_INT_BOTH, inductive_charging_interrupt)
|
|
|
|
GPIO(EC_INT_L, PIN(0, 6), 0)
|
|
GPIO(WP, PIN(0, 7), 0)
|
|
GPIO(ENTERING_RW, PIN(0, 8), 0)
|
|
GPIO(PCH_BKLTEN, PIN(0, 9), 0)
|
|
GPIO(ENABLE_BACKLIGHT, PIN(0, 10), 0)
|
|
|
|
/* Inductive charging */
|
|
GPIO(CHARGE_EN, PIN(0, 11), 0)
|
|
GPIO(BASE_CHG_VDD_EN, PIN(0, 12), 0)
|