ryu: enable inductive charging

Enable inductive charging on Ryu.

BUG=chrome-os-partner:31392
TEST=Sanity check only. Build and boot on Ryu.
BRANCH=None

Change-Id: I97f10d082aa939a982496b84c02c870fd59c3a68
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212716
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
diff --git a/board/ryu/board.c b/board/ryu/board.c
index 64b3388..a187eb9 100644
--- a/board/ryu/board.c
+++ b/board/ryu/board.c
@@ -14,6 +14,7 @@
 #include "hooks.h"
 #include "host_command.h"
 #include "i2c.h"
+#include "inductive_charging.h"
 #include "power.h"
 #include "power_button.h"
 #include "registers.h"
diff --git a/board/ryu/board.h b/board/ryu/board.h
index 973bcc4..ffeda6f 100644
--- a/board/ryu/board.h
+++ b/board/ryu/board.h
@@ -33,6 +33,7 @@
 #undef CONFIG_WATCHDOG_HELP
 #undef CONFIG_TASK_PROFILING
 #undef CONFIG_CONSOLE_CMDHELP
+#define CONFIG_INDUCTIVE_CHARGING
 
 /* Charging/Power configuration */
 #undef CONFIG_BATTERY_RYU /* TODO implement */
diff --git a/board/ryu/gpio.inc b/board/ryu/gpio.inc
index ac2153e..b7579eb 100644
--- a/board/ryu/gpio.inc
+++ b/board/ryu/gpio.inc
@@ -11,7 +11,7 @@
 GPIO(POWER_BUTTON_L,       C, 13, GPIO_INT_BOTH,                   power_button_interrupt) /* active high, the name is for compatibility with existing code */
 GPIO(USBC_BC12_INT_L,      D, 11, GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt)
 GPIO(LID_OPEN,             E, 1,  GPIO_INT_BOTH | GPIO_PULL_UP,    unhandled_evt)
-GPIO(CHARGE_DONE,          E, 6,  GPIO_INT_RISING,                 unhandled_evt)
+GPIO(CHARGE_DONE,          E, 6,  GPIO_INT_BOTH,                   inductive_charging_interrupt)
 GPIO(LB_INT_L,             E, 7,  GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt)
 GPIO(LIGHTBAR_EN_L,        E, 8,  GPIO_INT_FALLING | GPIO_PULL_UP, unhandled_evt)
 GPIO(AP_IN_SUSPEND,        E, 9,  GPIO_INT_BOTH | GPIO_PULL_UP,    power_signal_interrupt)