mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Fix missing GPIO interrupts
Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=push and release power button; should see debug messages Change-Id: I4a08b56247baa85555514623db7a04ab4638ca0e
This commit is contained in:
@@ -5,16 +5,17 @@
|
||||
/* EC for Link board configuration */
|
||||
|
||||
#include "board.h"
|
||||
#include "config.h"
|
||||
#include "gpio.h"
|
||||
#include "power_button.h"
|
||||
#include "registers.h"
|
||||
#include "util.h"
|
||||
#include "x86_power.h"
|
||||
|
||||
#ifndef CONFIG_X86POWER
|
||||
#ifndef CONFIG_TASK_X86POWER
|
||||
#define x86_power_interrupt NULL
|
||||
#endif
|
||||
#ifndef CONFIG_POWERBTN
|
||||
#ifndef CONFIG_TASK_POWERBTN
|
||||
#define power_button_interrupt NULL
|
||||
#endif
|
||||
|
||||
|
||||
@@ -87,6 +87,9 @@ int gpio_pre_init(void)
|
||||
/* Set all GPIOs to defaults */
|
||||
for (i = 0; i < GPIO_COUNT; i++, g++) {
|
||||
|
||||
/* Use as GPIO, not alternate function */
|
||||
gpio_set_alternate_function(g->port, g->mask, 0);
|
||||
|
||||
/* Handle GPIO direction */
|
||||
if (g->flags & GPIO_OUTPUT) {
|
||||
/* Output with default level */
|
||||
@@ -103,9 +106,6 @@ int gpio_pre_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Use as GPIO, not alternate function */
|
||||
gpio_set_alternate_function(g->port, g->mask, 0);
|
||||
|
||||
/* Set up interrupts if necessary */
|
||||
if (g->flags & GPIO_INT_LEVEL)
|
||||
LM4_GPIO_IS(g->port) |= g->mask;
|
||||
|
||||
Reference in New Issue
Block a user