summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/guybrush/baseboard.c13
-rw-r--r--include/usb_charge.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c
index cf3cd6edca..6cae883098 100644
--- a/baseboard/guybrush/baseboard.c
+++ b/baseboard/guybrush/baseboard.c
@@ -511,7 +511,18 @@ void ppc_interrupt(enum gpio_signal signal)
void bc12_interrupt(enum gpio_signal signal)
{
- /* TODO */
+ switch (signal) {
+ case GPIO_USB_C0_BC12_INT_ODL:
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
+ break;
+
+ case GPIO_USB_C1_BC12_INT_ODL:
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
+ break;
+
+ default:
+ break;
+ }
}
int baseboard_get_temp(int idx, int *temp_ptr)
diff --git a/include/usb_charge.h b/include/usb_charge.h
index dd0f221c28..7a102dac4c 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -11,6 +11,7 @@
#include "charge_manager.h"
#include "common.h"
#include "ec_commands.h"
+#include "task.h"
/* USB charger voltage */
#define USB_CHARGER_VOLTAGE_MV 5000